Skip to main content

Module content_format

Module content_format 

Source
Expand description

CoAP content-format IDs for EST media types.

RFC 9483 §5.4 defines Content-Format option values that map EST HTTP Content-Type headers to compact integer IDs for CoAP transport. These IDs are registered in the IANA “CoAP Content-Formats” registry per RFC 9483 §10.1.

CoAP uses a single integer in the Content-Format option (option 12) instead of a textual MIME type string, saving bytes on constrained links.

Constants§

APPLICATION_CSRATTRS
application/csrattrs (RFC 9483 §10.1, TBD287).
APPLICATION_PKCS8
application/pkcs8 (RFC 9483 §10.1, TBD286).
APPLICATION_PKCS7_MIME
application/pkcs7-mime (RFC 9483 §10.1, TBD284).
APPLICATION_PKCS7_MIME_CERTS_ONLY
application/pkcs7-mime; smime-type=certs-only (RFC 9483 §10.1, TBD281).
APPLICATION_PKCS7_MIME_CMC_REQUEST
application/pkcs7-mime; smime-type=CMC-Request (RFC 9483 §10.1, TBD282).
APPLICATION_PKCS7_MIME_CMC_RESPONSE
application/pkcs7-mime; smime-type=CMC-Response (RFC 9483 §10.1, TBD283).
APPLICATION_PKCS7_MIME_SERVER_GEN_TYPE
application/pkcs7-mime; smime-type=server-generated (RFC 9483 §10.1, TBD280).
APPLICATION_PKCS10
application/pkcs10 (RFC 9483 §10.1, TBD285).
MULTIPART_CORE
multipart/core (RFC 8710).

Functions§

from_http_content_type
Maps an HTTP Content-Type string to its CoAP Content-Format ID.
to_http_content_type
Maps a CoAP Content-Format ID to its HTTP Content-Type equivalent.