fake_server v1.2.0 FakeServer.HTTP.Response
Response structure
FakeServer makes use of the FakeServer.HTTP.Response structure to define the responses that will be given by the server.
The structure has the following fields:
:code
: The status code of the response. It must be an integer.:body
: The response body. Can be a string or a map.:headers
: The response headers. Must be a map with the string keys.
Link to this section Summary
Functions
Creates a new Response structure
Link to this section Functions
Link to this function
accepted(body \\ "", headers \\ %{})
Link to this function
already_reported(body \\ "", headers \\ %{})
Link to this function
bad_gateway(body \\ "", headers \\ %{})
Link to this function
bad_request(body \\ "", headers \\ %{})
Link to this function
conflict(body \\ "", headers \\ %{})
Link to this function
created(body \\ "", headers \\ %{})
Link to this function
default()
Link to this function
expectation_failed(body \\ "", headers \\ %{})
Link to this function
failed_dependency(body \\ "", headers \\ %{})
Link to this function
forbidden(body \\ "", headers \\ %{})
Link to this function
gateway_timeout(body \\ "", headers \\ %{})
Link to this function
gone(body \\ "", headers \\ %{})
Link to this function
http_version_not_supported(body \\ "", headers \\ %{})
Link to this function
im_a_teapot(body \\ "", headers \\ %{})
Link to this function
im_used(body \\ "", headers \\ %{})
Link to this function
insufficient_storage(body \\ "", headers \\ %{})
Link to this function
internal_server_error(body \\ "", headers \\ %{})
Link to this function
length_required(body \\ "", headers \\ %{})
Link to this function
locked(body \\ "", headers \\ %{})
Link to this function
loop_detected(body \\ "", headers \\ %{})
Link to this function
method_not_allowed(body \\ "", headers \\ %{})
Link to this function
misdirected_request(body \\ "", headers \\ %{})
Link to this function
multi_status(body \\ "", headers \\ %{})
Link to this function
network_authentication_required(body \\ "", headers \\ %{})
Link to this function
new(status, body \\ "", headers \\ %{})
Creates a new Response structure.
Link to this function
no_content(body \\ "", headers \\ %{})
Link to this function
non_authoritative_information(body \\ "", headers \\ %{})
Link to this function
not_acceptable(body \\ "", headers \\ %{})
Link to this function
not_extended(body \\ "", headers \\ %{})
Link to this function
not_found(body \\ "", headers \\ %{})
Link to this function
not_implemented(body \\ "", headers \\ %{})
Link to this function
ok(body \\ "", headers \\ %{})
Link to this function
partial_content(body \\ "", headers \\ %{})
Link to this function
payload_too_large(body \\ "", headers \\ %{})
Link to this function
payment_required(body \\ "", headers \\ %{})
Link to this function
precondition_failed(body \\ "", headers \\ %{})
Link to this function
precondition_required(body \\ "", headers \\ %{})
Link to this function
proxy_authentication_required(body \\ "", headers \\ %{})
Link to this function
request_header_fields_too_large(body \\ "", headers \\ %{})
Link to this function
request_timeout(body \\ "", headers \\ %{})
Link to this function
reset_content(body \\ "", headers \\ %{})
Link to this function
too_many_requests(body \\ "", headers \\ %{})
Link to this function
unauthorized(body \\ "", headers \\ %{})
Link to this function
unprocessable_entity(body \\ "", headers \\ %{})
Link to this function
unsupported_media_type(body \\ "", headers \\ %{})
Link to this function
upgrade_required(body \\ "", headers \\ %{})
Link to this function
uri_too_long(body \\ "", headers \\ %{})
Link to this function
variant_also_negotiates(body \\ "", headers \\ %{})