(accepted)
(accepted body)
202 Accepted (Success) The request has been accepted for processing but the processing has not been completed.
202 Accepted (Success) The request has been accepted for processing but the processing has not been completed.
(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.
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 body)
502 Bad Gateway (ServerError) The server was acting as a gateway or proxy and received an invalid response from the upstream server.
502 Bad Gateway (ServerError) The server was acting as a gateway or proxy and received an invalid response from the upstream server.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
502 Bad Gateway (ServerError) The server was acting as a gateway or proxy and received an invalid response from the upstream server. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(bad-request)
(bad-request body)
400 Bad Request (ClientError) The request contains bad syntax or cannot be fulfilled.
400 Bad Request (ClientError) The request contains bad syntax or cannot be fulfilled.
(bad-request!)
(bad-request! body)
400 Bad Request (ClientError) The request contains bad syntax or cannot be fulfilled. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
400 Bad Request (ClientError) The request contains bad syntax or cannot be fulfilled. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(bandwidth-limit-exceeded)
(bandwidth-limit-exceeded body)
509 Bandwidth Limit Exceeded (ServerError) Bandwidth limit has been exceeded.
509 Bandwidth Limit Exceeded (ServerError) Bandwidth limit has been exceeded.
(bandwidth-limit-exceeded!)
(bandwidth-limit-exceeded! body)
509 Bandwidth Limit Exceeded (ServerError) Bandwidth limit has been exceeded. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
509 Bandwidth Limit Exceeded (ServerError) Bandwidth limit has been exceeded. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
450 Blocked by Windows Parental Controls (ClientError) Windows Parental Controls are turned on and are blocking access to the given webpage.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
450 Blocked by Windows Parental Controls (ClientError) Windows Parental Controls are turned on and are blocking access to the given webpage. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(charset resp charset)
Returns an updated Ring response with the supplied charset added to the Content-Type header.
Returns an updated Ring response with the supplied charset added to the Content-Type header.
(conflict)
(conflict body)
409 Conflict (ClientError) The request could not be processed because of conflict in the request such as an edit conflict.
409 Conflict (ClientError) The request could not be processed because of conflict in the request such as an edit conflict.
(conflict!)
(conflict! body)
409 Conflict (ClientError) The request could not be processed because of conflict in the request such as an edit conflict. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
409 Conflict (ClientError) The request could not be processed because of conflict in the request such as an edit conflict. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(content-type resp content-type)
Returns an updated Ring response with the a Content-Type header corresponding to the given content-type.
Returns an updated Ring response with the a Content-Type header corresponding to the given content-type.
(continue)
100 Continue (Informational) The server has received the request headers and the client should proceed to send the request body.
100 Continue (Informational) The server has received the request headers and the client should proceed to send the request body.
(created)
(created url)
(created url body)
201 Created (Success) The request has been fulfilled and resulted in a new resource being created.
201 Created (Success) The request has been fulfilled and resulted in a new resource being created.
(enhance-your-calm)
(enhance-your-calm body)
420 Enhance Your Calm (ClientError) You are being rate-limited.
420 Enhance Your Calm (ClientError) You are being rate-limited.
(enhance-your-calm!)
(enhance-your-calm! body)
420 Enhance Your Calm (ClientError) You are being rate-limited. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
420 Enhance Your Calm (ClientError) You are being rate-limited. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(expectation-failed)
(expectation-failed body)
417 Expectation Failed (ClientError) The server cannot meet the requirements of the Expect request-header field.
417 Expectation Failed (ClientError) The server cannot meet the requirements of the Expect request-header field.
(expectation-failed!)
(expectation-failed! body)
417 Expectation Failed (ClientError) The server cannot meet the requirements of the Expect request-header field. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
417 Expectation Failed (ClientError) The server cannot meet the requirements of the Expect request-header field. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(failed-dependency)
(failed-dependency body)
424 Failed Dependency (ClientError) The request failed due to failure of a previous request.
424 Failed Dependency (ClientError) The request failed due to failure of a previous request.
(failed-dependency!)
(failed-dependency! body)
424 Failed Dependency (ClientError) The request failed due to failure of a previous request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
424 Failed Dependency (ClientError) The request failed due to failure of a previous request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(file-response filepath)
(file-response filepath options)
Returns a Ring response to serve a static file, or nil if an appropriate file does not exist. Options: :root - take the filepath relative to this root path :index-files? - look for index.* files in directories (defaults to true) :allow-symlinks? - allow symlinks that lead to paths outside the root path (defaults to false)
Returns a Ring response to serve a static file, or nil if an appropriate file does not exist. Options: :root - take the filepath relative to this root path :index-files? - look for index.* files in directories (defaults to true) :allow-symlinks? - allow symlinks that lead to paths outside the root path (defaults to false)
(find-header resp header-name)
Looks up a header in a Ring response (or request) case insensitively, returning the header map entry, or nil if not present.
Looks up a header in a Ring response (or request) case insensitively, returning the header map entry, or nil if not present.
(forbidden)
(forbidden body)
403 Forbidden (ClientError) The request was a legal request but the server is refusing to respond to it.
403 Forbidden (ClientError) The request was a legal request but the server is refusing to respond to it.
(forbidden!)
(forbidden! body)
403 Forbidden (ClientError) The request was a legal request but the server is refusing to respond to it. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
403 Forbidden (ClientError) The request was a legal request but the server is refusing to respond to it. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(found url)
302 Found (Redirection) The resource was found but at a different URI.
302 Found (Redirection) The resource was found but at a different URI.
(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.
504 Gateway Timeout (ServerError) The server was acting as a gateway or proxy and did not receive a timely request from the upstream server.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
504 Gateway Timeout (ServerError) The server was acting as a gateway or proxy and did not receive a timely request from the upstream server. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(get-charset resp)
Gets the character encoding of a Ring response.
Gets the character encoding of a Ring response.
(get-header resp header-name)
Looks up a header in a Ring response (or request) case insensitively, returning the value of the header, or nil if not present.
Looks up a header in a Ring response (or request) case insensitively, returning the value of the header, or nil if not present.
(gone)
(gone body)
410 Gone (ClientError) The resource requested is no longer available and will not be available again.
410 Gone (ClientError) The resource requested is no longer available and will not be available again.
(gone!)
(gone! body)
410 Gone (ClientError) The resource requested is no longer available and will not be available again. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
410 Gone (ClientError) The resource requested is no longer available and will not be available again. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(header resp name value)
Returns an updated Ring response with the specified header added.
Returns an updated Ring response with the specified header added.
(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.
505 HTTP Version Not Supported (ServerError) The server does not support the HTTP protocol version used in the request.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
505 HTTP Version Not Supported (ServerError) The server does not support the HTTP protocol version used in the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
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 body)
507 Insufficient Storage (ServerError) Insufficient storage to complete the request.
507 Insufficient Storage (ServerError) Insufficient storage to complete the request.
(insufficient-storage!)
(insufficient-storage! body)
507 Insufficient Storage (ServerError) Insufficient storage to complete the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
507 Insufficient Storage (ServerError) Insufficient storage to complete the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(internal-server-error)
(internal-server-error body)
500 Internal Server Error (ServerError) There was an internal server error.
500 Internal Server Error (ServerError) There was an internal server error.
(internal-server-error!)
(internal-server-error! body)
500 Internal Server Error (ServerError) There was an internal server error. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
500 Internal Server Error (ServerError) There was an internal server error. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
411 Length Required (ClientError) The request did not specify the length of its content which is required by the requested resource.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
411 Length Required (ClientError) The request did not specify the length of its content which is required by the requested resource. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(locked)
(locked body)
423 Locked (ClientError) The resource that is being accessed is locked.
423 Locked (ClientError) The resource that is being accessed is locked.
(locked!)
(locked! body)
423 Locked (ClientError) The resource that is being accessed is locked. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
423 Locked (ClientError) The resource that is being accessed is locked. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(loop-detected)
(loop-detected body)
508 Loop Detected (ServerError) The server detected an infinite loop while processing the request.
508 Loop Detected (ServerError) The server detected an infinite loop while processing the request.
(loop-detected!)
(loop-detected! body)
508 Loop Detected (ServerError) The server detected an infinite loop while processing the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
508 Loop Detected (ServerError) The server detected an infinite loop while processing the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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;
405 Method Not Allowed (ClientError) A request was made of a resource using a request method not supported by that resource;
(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; Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
405 Method Not Allowed (ClientError) A request was made of a resource using a request method not supported by that resource; Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(moved-permanently url)
301 Moved Permanently (Redirection) This and all future requests should be directed to the given URI.
301 Moved Permanently (Redirection) This and all future requests should be directed to the given URI.
(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.
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 url)
300 Multiple Choices (Redirection) There are multiple options for the resource that the client may follow.
300 Multiple Choices (Redirection) There are multiple options for the resource that the client may follow.
(network-authentication-required)
(network-authentication-required body)
511 Network Authentication Required (ServerError) The client needs to authenticate to gain network access.
511 Network Authentication Required (ServerError) The client needs to authenticate to gain network access.
(network-authentication-required!)
(network-authentication-required! body)
511 Network Authentication Required (ServerError) The client needs to authenticate to gain network access. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
511 Network Authentication Required (ServerError) The client needs to authenticate to gain network access. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(network-connect-timeout)
(network-connect-timeout body)
599 Network connect timeout (ServerError)
599 Network connect timeout (ServerError)
(network-connect-timeout!)
(network-connect-timeout! body)
599 Network connect timeout (ServerError)
Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
599 Network connect timeout (ServerError) Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(network-read-timeout)
(network-read-timeout body)
598 Network read timeout (ServerError)
598 Network read timeout (ServerError)
(network-read-timeout!)
(network-read-timeout! body)
598 Network read timeout (ServerError)
Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
598 Network read timeout (ServerError) Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
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 body)
203 Non-Authoritative Information (Success) The server successfully processed the request but is returning information that may be from another source.
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 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.
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-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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
406 Not Acceptable (ClientError) The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(not-extended)
(not-extended body)
510 Not Extended (ServerError) Further extensions to the request are required for the server to fulfill it.
510 Not Extended (ServerError) Further extensions to the request are required for the server to fulfill it.
(not-extended!)
(not-extended! body)
510 Not Extended (ServerError) Further extensions to the request are required for the server to fulfill it. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
510 Not Extended (ServerError) Further extensions to the request are required for the server to fulfill it. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(not-found)
(not-found body)
404 Not Found (ClientError) The requested resource could not be found but may be available again in the future.
404 Not Found (ClientError) The requested resource could not be found but may be available again in the future.
(not-found!)
(not-found! body)
404 Not Found (ClientError) The requested resource could not be found but may be available again in the future. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
404 Not Found (ClientError) The requested resource could not be found but may be available again in the future. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
501 Not Implemented (ServerError) The server either does not recognize the request method or it lacks the ability to fulfill the request.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
501 Not Implemented (ServerError) The server either does not recognize the request method or it lacks the ability to fulfill the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(not-modified)
304 Not Modified (Redirection) The resource has not been modified since last requested.
304 Not Modified (Redirection) The resource has not been modified since last requested.
(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.
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 body)
402 Payment Required (ClientError) Reserved for future use.
402 Payment Required (ClientError) Reserved for future use.
(payment-required!)
(payment-required! body)
402 Payment Required (ClientError) Reserved for future use. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
402 Payment Required (ClientError) Reserved for future use. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(permanent-redirect url)
308 Permanent Redirect (Redirection) The request and all future requests should be repeated using another URI.
308 Permanent Redirect (Redirection) The request and all future requests should be repeated using another URI.
(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.
412 Precondition Failed (ClientError) The server does not meet one of the preconditions that the requester put on the request.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
412 Precondition Failed (ClientError) The server does not meet one of the preconditions that the requester put on the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(precondition-required)
(precondition-required body)
428 Precondition Required (ClientError) The server requires the request to be conditional.
428 Precondition Required (ClientError) The server requires the request to be conditional.
(precondition-required!)
(precondition-required! body)
428 Precondition Required (ClientError) The server requires the request to be conditional. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
428 Precondition Required (ClientError) The server requires the request to be conditional. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(processing)
102 Processing (Informational) The server is processing the request but no response is available yet.
102 Processing (Informational) The server is processing the request but no response is available yet.
(proxy-authentication-required)
(proxy-authentication-required body)
407 Proxy Authentication Required (ClientError) Proxy authentication is required to access the requested resource.
407 Proxy Authentication Required (ClientError) Proxy authentication is required to access the requested resource.
(proxy-authentication-required!)
(proxy-authentication-required! body)
407 Proxy Authentication Required (ClientError) Proxy authentication is required to access the requested resource. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
407 Proxy Authentication Required (ClientError) Proxy authentication is required to access the requested resource. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
413 Request Entity Too Large (ClientError) The request is larger than the server is willing or able to process.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
413 Request Entity Too Large (ClientError) The request is larger than the server is willing or able to process. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
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-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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(request-timeout)
(request-timeout body)
408 Request Timeout (ClientError) The server timed out waiting for the request.
408 Request Timeout (ClientError) The server timed out waiting for the request.
(request-timeout!)
(request-timeout! body)
408 Request Timeout (ClientError) The server timed out waiting for the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
408 Request Timeout (ClientError) The server timed out waiting for the request. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
414 Request-URI Too Long (ClientError) The URI provided was too long for the server to process.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
414 Request-URI Too Long (ClientError) The URI provided was too long for the server to process. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
416 Requested Range Not Satisfiable (ClientError) The client has asked for a portion of the file but the server cannot supply that portion.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
416 Requested Range Not Satisfiable (ClientError) The client has asked for a portion of the file but the server cannot supply that portion. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
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.
(resource-data url)
Returns data about the resource specified by url, or nil if an appropriate resource does not exist.
The return value is a map with optional values for: :content - the content of the URL, suitable for use as the :body of a ring response :content-length - the length of the :content, nil if not available :last-modified - the Date the :content was last modified, nil if not available
This dispatches on the protocol of the URL as a keyword, and implementations are provided for :file and :jar. If you are on a platform where (Class/getResource) returns URLs with a different protocol, you will need to provide an implementation for that protocol.
This function is used internally by url-response.
Returns data about the resource specified by url, or nil if an appropriate resource does not exist. The return value is a map with optional values for: :content - the content of the URL, suitable for use as the :body of a ring response :content-length - the length of the :content, nil if not available :last-modified - the Date the :content was last modified, nil if not available This dispatches on the protocol of the URL as a keyword, and implementations are provided for :file and :jar. If you are on a platform where (Class/getResource) returns URLs with a different protocol, you will need to provide an implementation for that protocol. This function is used internally by url-response.
(resource-response path)
(resource-response path options)
Returns a Ring response to serve a packaged resource, or nil if the resource does not exist. Options: :root - take the resource relative to this root :loader - resolve the resource in this class loader :allow-symlinks? - allow symlinks that lead to paths outside the root classpath directories (defaults to false)
Returns a Ring response to serve a packaged resource, or nil if the resource does not exist. Options: :root - take the resource relative to this root :loader - resolve the resource in this class loader :allow-symlinks? - allow symlinks that lead to paths outside the root classpath directories (defaults to false)
(response? resp)
True if the supplied value is a valid response map.
True if the supplied value is a valid response map.
(retry-with)
(retry-with body)
449 Retry With (ClientError) The request should be retried after doing the appropriate action.
449 Retry With (ClientError) The request should be retried after doing the appropriate action.
(retry-with!)
(retry-with! body)
449 Retry With (ClientError) The request should be retried after doing the appropriate action. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
449 Retry With (ClientError) The request should be retried after doing the appropriate action. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(see-other url)
303 See Other (Redirection) The response to the request can be found under another URI using a GET method.
303 See Other (Redirection) The response to the request can be found under another URI using a GET method.
(service-unavailable)
(service-unavailable body)
503 Service Unavailable (ServerError) The server is currently unavailable (because it is overloaded or down for maintenance).
503 Service Unavailable (ServerError) The server is currently unavailable (because it is overloaded or down for maintenance).
(service-unavailable!)
(service-unavailable! body)
503 Service Unavailable (ServerError) The server is currently unavailable (because it is overloaded or down for maintenance). Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
503 Service Unavailable (ServerError) The server is currently unavailable (because it is overloaded or down for maintenance). Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(set-cookie resp name value & [opts])
Sets a cookie on the response. Requires the handler to be wrapped in the wrap-cookies middleware.
Sets a cookie on the response. Requires the handler to be wrapped in the wrap-cookies middleware.
(status resp status)
Returns an updated Ring response with the given status.
Returns an updated Ring response with the given status.
(switching-protocols)
101 Switching Protocols (Informational) The server is switching protocols because the client requested the switch.
101 Switching Protocols (Informational) The server is switching protocols because the client requested the switch.
(temporary-redirect url)
307 Temporary Redirect (Redirection) The request should be repeated with another URI but future requests can still use the original URI.
307 Temporary Redirect (Redirection) The request should be repeated with another URI but future requests can still use the original URI.
(throw! response)
Throwns an exception with ex-info: {:type :ring.util.http-response/response :response response}
Throwns an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
429 Too Many Requests (ClientError) The user has sent too many requests in a given amount of time.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
429 Too Many Requests (ClientError) The user has sent too many requests in a given amount of time. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(unauthorized)
(unauthorized body)
401 Unauthorized (ClientError) Authentication is possible but has failed or not yet been provided.
401 Unauthorized (ClientError) Authentication is possible but has failed or not yet been provided.
(unauthorized!)
(unauthorized! body)
401 Unauthorized (ClientError) Authentication is possible but has failed or not yet been provided. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
401 Unauthorized (ClientError) Authentication is possible but has failed or not yet been provided. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(unavailable-for-legal-reasons)
(unavailable-for-legal-reasons body)
451 Unavailable For Legal Reasons (ClientError) Resource access is denied for legal reasons.
451 Unavailable For Legal Reasons (ClientError) Resource access is denied for legal reasons.
(unavailable-for-legal-reasons!)
(unavailable-for-legal-reasons! body)
451 Unavailable For Legal Reasons (ClientError) Resource access is denied for legal reasons. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
451 Unavailable For Legal Reasons (ClientError) Resource access is denied for legal reasons. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(unordered-collection)
(unordered-collection body)
425 Unordered Collection (ClientError) The collection is unordered.
425 Unordered Collection (ClientError) The collection is unordered.
(unordered-collection!)
(unordered-collection! body)
425 Unordered Collection (ClientError) The collection is unordered. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
425 Unordered Collection (ClientError) The collection is unordered. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(unprocessable-entity)
(unprocessable-entity body)
422 Unprocessable Entity (ClientError) The request was well-formed but was unable to be followed due to semantic errors.
422 Unprocessable Entity (ClientError) The request was well-formed but was unable to be followed due to semantic errors.
(unprocessable-entity!)
(unprocessable-entity! body)
422 Unprocessable Entity (ClientError) The request was well-formed but was unable to be followed due to semantic errors. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
422 Unprocessable Entity (ClientError) The request was well-formed but was unable to be followed due to semantic errors. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(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.
415 Unsupported Media Type (ClientError) The request entity has a media type which the server or resource does not support.
(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. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
415 Unsupported Media Type (ClientError) The request entity has a media type which the server or resource does not support. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(update-header resp header-name f & args)
Looks up a header in a Ring response (or request) case insensitively, then updates the header with the supplied function and arguments in the manner of update-in.
Looks up a header in a Ring 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 body)
426 Upgrade Required (ClientError) The client should switch to a different protocol.
426 Upgrade Required (ClientError) The client should switch to a different protocol.
(upgrade-required!)
(upgrade-required! body)
426 Upgrade Required (ClientError) The client should switch to a different protocol. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
426 Upgrade Required (ClientError) The client should switch to a different protocol. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
(url-response url)
Return a response for the supplied URL.
Return a response for the supplied URL.
(use-proxy url)
305 Use Proxy (Redirection) This single request is to be repeated via the proxy given by the Location field.
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 body)
506 Variant Also Negotiates (ServerError) Transparent content negotiation for the request results in a circular reference.
506 Variant Also Negotiates (ServerError) Transparent content negotiation for the request results in a circular reference.
(variant-also-negotiates!)
(variant-also-negotiates! body)
506 Variant Also Negotiates (ServerError) Transparent content negotiation for the request results in a circular reference. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
506 Variant Also Negotiates (ServerError) Transparent content negotiation for the request results in a circular reference. Throws an exception with ex-info: {:type :ring.util.http-response/response :response response}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close