Module response

Source
Expand description

Common builders for RPC responses. Contains common builders for hyper responses.

Functions§

host_not_allowed
Create a text/plain response for not allowed hosts.
internal_error
Create a response for json internal error.
invalid_allow_headers
Create a text/plain response for invalid CORS “Allow-*” headers.
invalid_allow_origin
Create a text/plain response for invalid CORS “Origin” headers.
malformed
Create a json response for empty or malformed requests (400)
method_not_allowed
Create a text/plain response for disallowed method used.
ok_response
Create a valid JSON response.
too_large
Create a json response for oversized requests (413)
unsupported_content_type
Create a response for unsupported content type.