class ContentSerializationType(ACMEIntEnum):
Constructors: ContentSerializationType.fromCoAP(t), ContentSerializationType.fromWebSocketSubProtocol(t), ContentSerializationType.getType(t, default)
Content Serialization Types
| Class Method | from |
Return the enum from a string for a content serialization. |
| Class Method | from |
Return the enum from a string for a content serialization. |
| Class Method | get |
Return the enum from a content-type header definition. |
| Class Method | supported |
Return a list of supported media types for content serialization. |
| Class Method | supported |
Return a simplified (only the names of the serializations) list of supported media types for content serialization. |
| Class Method | supported |
Return a list of supported media types for content serialization for WebSocket communication. |
| Method | __eq__ |
Compare two ContentSerializationType enums for equality. |
| Method | to |
Return the http mime header for an enum value. |
| Method | to |
Return the simple string for an enum value. |
| Method | to |
Return the WebSocket content header for an enum value. |
| Constant | CBOR |
CBOR. |
| Constant | JSON |
JSON. |
| Constant | PLAIN |
Plain text. |
| Constant | UNKNOWN |
Unknown. |
| Constant | XML |
XML. |
Inherited from ACMEIntEnum:
| Class Method | has |
Check whether the enum type has an entry with either the given int value or string name. |
| Class Method | to |
Return an enum value by its name. |
| Method | __int__ |
Get the integer value of an enum. |
| Method | __repr__ |
Stringify an enum. |
| Method | __str__ |
Stringify an enum. |
Return the enum from a string for a content serialization.
| Parameters | |
t:int | content type number to convert |
| Returns | |
ContentSerializationType | The enum value. |
Return the enum from a string for a content serialization.
| Parameters | |
t:str | String to convert. |
| Returns | |
ContentSerializationType | The enum value. |
str | ContentSerializationType, default: ContentSerializationType | None = None) -> ContentSerializationType:
¶
Return the enum from a content-type header definition.
| Parameters | |
t:str | ContentSerializationType | String to convert. If it is already an enum, it is returned as is. |
default:ContentSerializationType | None | Default value to return if the string is not a valid content-type. |
| Returns | |
ContentSerializationType | The enum value. |
Return a list of supported media types for content serialization.
| Returns | |
list[ | A list of supported media types for content serialization. |
Return a simplified (only the names of the serializations) list of supported media types for content serialization.
| Returns | |
list[ | A list of supported media types for content serialization. |
Return a list of supported media types for content serialization for WebSocket communication.
| Returns | |
Sequence[ | A list of supported media types for content serialization. |
Compare two ContentSerializationType enums for equality.
| Parameters | |
other:object | The other enum to compare with. |
| Returns | |
bool | True if the enums are equal. |