Maintainer | ulf.lilleengen@gmail.com |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
License: BSD3
The CoAP client API is intended to provide the minimal building block needed for sending CoAP requests. The API exposes CoAP request and response types and handles all internal messaging details of the CoAP protocol.
- data Request = Request {}
- data Client
- data Method
- data Response = Response {}
- data ResponseCode
- = Created
- | Deleted
- | Valid
- | Changed
- | Content
- | BadRequest
- | Unauthorized
- | BadOption
- | Forbidden
- | NotFound
- | MethodNotAllowed
- | NotAcceptable
- | PreconditionFailed
- | RequestEntityTooLarge
- | UnsupportedFormat
- | InternalServerError
- | NotImplemented
- | BadGateway
- | ServiceUnavailable
- | GatewayTimeout
- | ProxyingNotSupported
- data Option
- type OptionString = ByteString
- data MediaType
- doRequest :: Client -> Endpoint -> Request -> IO Response
- createClient :: Transport -> IO Client
- shutdownClient :: Client -> IO ()
Documentation
CoAP request.
Request | |
|
CoAP response.
data ResponseCode Source
CoAP response codes.
CoAP Option types.
type OptionString = ByteString Source
CoAP Option ByteString
Supported media types in CoAP RFC for ContentFormat
doRequest :: Client -> Endpoint -> Request -> IO Response Source
Send a CoAP request to a given endpoint. Returns a CoAP response.
createClient :: Transport -> IO Client Source
Create a client using a given transport. This will spawn internal messaging threads making the client ready to send requests.
shutdownClient :: Client -> IO () Source
Shuts down the internal messaging threads and stops the client