macchiato.util.response

accepted

(accepted)(accepted body)
202 Accepted (Success)
The request has been accepted for processing but the processing has not been completed.

already-reported

(already-reported)(already-reported body)
208 Already Reported (Success)
The members of a DAV binding have already been enumerated in a previous reply to this request and are not being included again.

bad-gateway

(bad-gateway)(bad-gateway body)
502 Bad Gateway (ServerError)
The server was acting as a gateway or proxy and received an invalid response from the upstream server.

bad-request

(bad-request)(bad-request body)
400 Bad Request (ClientError)
The request contains bad syntax or cannot be fulfilled.

bandwidth-limit-exceeded

(bandwidth-limit-exceeded)(bandwidth-limit-exceeded body)
509 Bandwidth Limit Exceeded (ServerError)
Bandwidth limit has been exceeded.

blocked-by-windows-parental-controls

(blocked-by-windows-parental-controls)(blocked-by-windows-parental-controls body)
450 Blocked by Windows Parental Controls (ClientError)
Windows Parental Controls are turned on and are blocking access to the given webpage.

charset

(charset resp charset)
Returns an updated response with the supplied charset added to the
Content-Type header.

conflict

(conflict)(conflict body)
409 Conflict (ClientError)
The request could not be processed because of conflict in the request such as an edit conflict.

content-type

(content-type resp content-type)
Returns an updated response with the a Content-Type header corresponding
to the given content-type.

continue

(continue)
100 Continue (Informational)
The server has received the request headers and the client should proceed to send the request body.

created

(created)(created url)(created url body)
201 Created (Success)
The request has been fulfilled and resulted in a new resource being created.

enhance-your-calm

(enhance-your-calm)(enhance-your-calm body)
420 Enhance Your Calm (ClientError)
You are being rate-limited.

expectation-failed

(expectation-failed)(expectation-failed body)
417 Expectation Failed (ClientError)
The server cannot meet the requirements of the Expect request-header field.

failed-dependency

(failed-dependency)(failed-dependency body)
424 Failed Dependency (ClientError)
The request failed due to failure of a previous request.

file

(file path)
accepts a path to a file, and returns a response with the body set to the file stream.

find-header

(find-header resp header-name)
Looks up a header in a response (or request) case insensitively,
returning the header map entry, or nil if not present.

forbidden

(forbidden)(forbidden body)
403 Forbidden (ClientError)
The request was a legal request but the server is refusing to respond to it.

found

(found url)
302 Found (Redirection)
The resource was found but at a different URI.

gateway-timeout

(gateway-timeout)(gateway-timeout body)
504 Gateway Timeout (ServerError)
The server was acting as a gateway or proxy and did not receive a timely request from the upstream server.

get-header

(get-header resp header-name)
Looks up a header in a response (or request) case insensitively,
returning the value of the header, or nil if not present.

gone

(gone)(gone body)
410 Gone (ClientError)
The resource requested is no longer available and will not be available again.

header

(header resp name value)
Returns an updated response with the specified header added.

http-version-not-supported

(http-version-not-supported)(http-version-not-supported body)
505 HTTP Version Not Supported (ServerError)
The server does not support the HTTP protocol version used in the request.

im-used

(im-used)(im-used body)
226 IM Used (Success)
The server has fulfilled a GET request for the resource and the response is a representation of the result of one or more instance-manipulations applied to the current instance.

insufficient-storage

(insufficient-storage)(insufficient-storage body)
507 Insufficient Storage (ServerError)
Insufficient storage to complete the request.

internal-server-error

(internal-server-error)(internal-server-error body)
500 Internal Server Error (ServerError)
There was an internal server error.

json

(json resp)
Turns the payload into a proper response map if it isn't and sets the
content type to json.

length-required

(length-required)(length-required body)
411 Length Required (ClientError)
The request did not specify the length of its content which is required by the requested resource.

locked

(locked)(locked body)
423 Locked (ClientError)
The resource that is being accessed is locked.

loop-detected

(loop-detected)(loop-detected body)
508 Loop Detected (ServerError)
The server detected an infinite loop while processing the request.

method-not-allowed

(method-not-allowed)(method-not-allowed body)
405 Method Not Allowed (ClientError)
A request was made of a resource using a request method not supported by that resource;

moved-permanently

(moved-permanently url)
301 Moved Permanently (Redirection)
This and all future requests should be directed to the given URI.

multi-status

(multi-status)(multi-status body)
207 Multi-Status (Success)
The message body that follows is an XML message and can contain a number of separate response codes depending on how many sub-requests were made.

multiple-choices

(multiple-choices url)
300 Multiple Choices (Redirection)
There are multiple options for the resource that the client may follow.

network-authentication-required

(network-authentication-required)(network-authentication-required body)
511 Network Authentication Required (ServerError)
The client needs to authenticate to gain network access.

network-connect-timeout

(network-connect-timeout)(network-connect-timeout body)
599 Network connect timeout (ServerError)

network-read-timeout

(network-read-timeout)(network-read-timeout body)
598 Network read timeout (ServerError)

no-content

(no-content)
204 No Content (Success)
The server successfully processed the request, but is not returning any content. Usually used as a response to a successful delete request.

non-authoritative-information

(non-authoritative-information)(non-authoritative-information body)
203 Non-Authoritative Information (Success)
The server successfully processed the request but is returning information that may be from another source.

not-acceptable

(not-acceptable)(not-acceptable body)
406 Not Acceptable (ClientError)
The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.

not-extended

(not-extended)(not-extended body)
510 Not Extended (ServerError)
Further extensions to the request are required for the server to fulfill it.

not-found

(not-found)(not-found body)
404 Not Found (ClientError)
The requested resource could not be found but may be available again in the future.

not-implemented

(not-implemented)(not-implemented body)
501 Not Implemented (ServerError)
The server either does not recognize the request method or it lacks the ability to fulfill the request.

not-modified

(not-modified)
304 Not Modified (Redirection)
The resource has not been modified since last requested.

ok

(ok)(ok body)
200 OK (Success)
OK

partial-content

(partial-content)(partial-content body)
206 Partial Content (Success)
The server is delivering only part of the resource due to a range header sent by the client.

payment-required

(payment-required)(payment-required body)
402 Payment Required (ClientError)
Reserved for future use.

permanent-redirect

(permanent-redirect url)
308 Permanent Redirect (Redirection)
The request and all future requests should be repeated using another URI.

precondition-failed

(precondition-failed)(precondition-failed body)
412 Precondition Failed (ClientError)
The server does not meet one of the preconditions that the requester put on the request.

precondition-required

(precondition-required)(precondition-required body)
428 Precondition Required (ClientError)
The server requires the request to be conditional.

processing

(processing)
102 Processing (Informational)
The server is processing the request but no response is available yet.

proxy-authentication-required

(proxy-authentication-required)(proxy-authentication-required body)
407 Proxy Authentication Required (ClientError)
Proxy authentication is required to access the requested resource.

request-entity-too-large

(request-entity-too-large)(request-entity-too-large body)
413 Request Entity Too Large (ClientError)
The request is larger than the server is willing or able to process.

request-header-fields-too-large

(request-header-fields-too-large)(request-header-fields-too-large body)
431 Request Header Fields Too Large (ClientError)
The server is unwilling to process the request because either an individual header field or all the header fields collectively are too large.

request-timeout

(request-timeout)(request-timeout body)
408 Request Timeout (ClientError)
The server timed out waiting for the request.

request-uri-too-long

(request-uri-too-long)(request-uri-too-long body)
414 Request-URI Too Long (ClientError)
The URI provided was too long for the server to process.

requested-range-not-satisfiable

(requested-range-not-satisfiable)(requested-range-not-satisfiable body)
416 Requested Range Not Satisfiable (ClientError)
The client has asked for a portion of the file but the server cannot supply that portion.

reset-content

(reset-content)
205 Reset Content (Success)
The server successfully processed the request but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.

response?

(response? resp)
True if the supplied value is a valid response map.

retry-with

(retry-with)(retry-with body)
449 Retry With (ClientError)
The request should be retried after doing the appropriate action.

see-other

(see-other url)
303 See Other (Redirection)
The response to the request can be found under another URI using a GET method.

service-unavailable

(service-unavailable)(service-unavailable body)
503 Service Unavailable (ServerError)
The server is currently unavailable (because it is overloaded or down for maintenance).

sorted-json

(sorted-json resp)
Turns the payload into a sorted JSON response.

status

(status resp status)
sets the status code of the response

switching-protocols

(switching-protocols)
101 Switching Protocols (Informational)
The server is switching protocols because the client requested the switch.

temporary-redirect

(temporary-redirect url)
307 Temporary Redirect (Redirection)
The request should be repeated with another URI but future requests can still use the original URI.

too-many-requests

(too-many-requests)(too-many-requests body)
429 Too Many Requests (ClientError)
The user has sent too many requests in a given amount of time.

transit

(transit resp)

unauthorized

(unauthorized)(unauthorized body)
401 Unauthorized (ClientError)
Authentication is possible but has failed or not yet been provided.

unordered-collection

(unordered-collection)(unordered-collection body)
425 Unordered Collection (ClientError)
The collection is unordered.

unprocessable-entity

(unprocessable-entity)(unprocessable-entity body)
422 Unprocessable Entity (ClientError)
The request was well-formed but was unable to be followed due to semantic errors.

unsupported-media-type

(unsupported-media-type)(unsupported-media-type body)
415 Unsupported Media Type (ClientError)
The request entity has a media type which the server or resource does not support.

update-header

(update-header resp header-name f & args)
Looks up a header in a response (or request) case insensitively,
then updates the header with the supplied function and arguments in the
manner of update-in.

upgrade-required

(upgrade-required)(upgrade-required body)
426 Upgrade Required (ClientError)
The client should switch to a different protocol.

use-proxy

(use-proxy url)
305 Use Proxy (Redirection)
This single request is to be repeated via the proxy given by the Location field.

variant-also-negotiates

(variant-also-negotiates)(variant-also-negotiates body)
506 Variant Also Negotiates (ServerError)
Transparent content negotiation for the request results in a circular reference.