Expand description
SES XML response formatting and error serialization.
SES v1 responses use text/xml content type following the awsQuery protocol.
SES v2 responses use application/json.
All SES v1 responses follow the pattern:
<{Operation}Response xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
<{Operation}Result>
...fields...
</{Operation}Result>
<ResponseMetadata>
<RequestId>{uuid}</RequestId>
</ResponseMetadata>
</{Operation}Response>Structs§
- XmlWriter
- Simple XML writer for building SES response XML.
Constants§
- JSON_
CONTENT_ TYPE - Content type for SES v2 JSON responses.
- XML_
CONTENT_ TYPE - Content type for SES v1 XML responses.
Functions§
- error_
to_ json_ response - Convert an
SesErrorinto a JSON error response (for v2). - error_
to_ response - Convert an
SesErrorinto a complete HTTP error response (XML for v1). - error_
to_ xml - Serialize an SES error into an XML error response body string.
- json_
response - Build a success JSON response for SES v2.
- xml_
escape - XML-escape a string value.
- xml_
response - Build a success XML response with the given body and request ID.