Controls how RestRserve encodes and decodes different content types. Designed to work jointly with EncodeDecodeMiddleware
handlers
Handlers storage environment.
new()
Creates ContentHandlersFactory object.
ContentHandlersFactory$new()
set_encode()
Set handler to encode body for the specific content type.
ContentHandlersFactory$set_encode(content_type, FUN)
content_type
MIME type.
FUN
Function to encode response body.
get_encode()
Get encoder function for the specific content type.
ContentHandlersFactory$get_encode(content_type)
content_type
MIME type.
set_decode()
Set handler to decode body for the specific content type.
ContentHandlersFactory$set_decode(content_type, FUN)
content_type
MIME type.
FUN
Function to decode request body.
get_decode()
Get decoder function for the specific content type.
ContentHandlersFactory$get_decode(content_type)
content_type
MIME type.
List of handlers.
reset()
Resets all the content handlers to RestRserve defaults.
ContentHandlersFactory$reset()
clone()
The objects of this class are cloneable with this method.
ContentHandlersFactory$clone(deep = FALSE)
deep
Whether to make a deep clone.
Application EncodeDecodeMiddleware