Handling of HTTP requests to AWS Services.
Sends a Request to a Service without signing it.
HTTP request methods.
Request path.
Holds an unsigned AWS HTTP request.
Creates an unsigned HTTP request to an AWS service.
Holds a request body.
MIME type.
Create an empty body.
Create a body with a custom MIME type and the given string as content.
stringBody "text/html" "<html><body><h1>Hello</h1></body></html>"Create a body containing a JSON value.
This will automatically add the Content-Type: application/json header.
Appends headers to an AWS HTTP unsigned request.
See the AWS.KVEncode for encoder functions to build the headers with.
Appends query arguments to an AWS HTTP unsigned request.
See the AWS.KVEncode for encoder functions to build the query parameters with.
Decoders that interpret responses.
The HTTP response code type according to how Elm.Http classifies responses.
A code from 200 to less than 300 is considered 'Good' and any other code is considered 'Bad'.
A full decoder for the response that can look at the status code, metadata
including headers and so on. The body is presented as a String for parsing.
It is possible to report an error as a String when interpreting the response, and
this will be mapped onto Http.BadBody when present.
A full JSON decoder for the response that can look at the status code, metadata
including headers and so on. The body is presented as a JSON Value for decoding.
Any decoder error is mapped onto Http.BadBody as a String when present using
Decode.errorToString.
A decoder for the response that uses only the body presented as a String
for parsing.
It is possible to report an error as a String when interpreting the response, and
this will be mapped onto Http.BadBody when present.
Note that this decoder is only used when the response is Http.GoodStatus_. An Http.BadStatus_ is always mapped to Http.BadStatus without attempting to decode the body. If you need to handle things that Elm HTTP regards as BadStatus_, use one of the 'full' decoders.
A decoder for the response that uses only the body presented as a JSON Value
for decoding.
Any decoder error is mapped onto Http.BadBody as a String when present using
Decode.errorToString.
Note that this decoder is only used when the response is Http.GoodStatus_. An Http.BadStatus_ is always mapped to Http.BadStatus without attempting to decode the body. If you need to handle things that Elm HTTP regards as BadStatus_, use one of the 'full' decoders.
Not all AWS service produce a response that contains useful information.
The constantDecoder is helpful in those situations and just produces whatever
value you give it once AWS has responded.
Note that this decoder is only used when the response is Http.GoodStatus_. An Http.BadStatus_ is always mapped to Http.BadStatus without attempting to decode the body. If you need to handle things that Elm HTTP regards as BadStatus_, use one of the 'full' decoders.
Signs and sends a
Requestto aService.