Sap v0.1.0 Sap.Combinators.Redirect View Source

Redirect responses

Link to this section Summary

Functions

This response code means that URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests

This response code means that URI of requested resource has been changed. Probably, new URI would be given in the response

This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response

This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request

Server sent this response to directing client to get requested resource to another URI with an GET request

Server sent this response to directing client to get requested resource to another URI with same method that used prior request. This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request

Link to this section Functions

This response code means that URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.

Link to this function moved_permanently(location) View Source
moved_permanently(String.t()) :: Sap.Combinators.combinator()

This response code means that URI of requested resource has been changed. Probably, new URI would be given in the response.

This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response.

Link to this function permanent_redirect(location) View Source
permanent_redirect(String.t()) :: Sap.Combinators.combinator()

This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.

Server sent this response to directing client to get requested resource to another URI with an GET request.

Link to this function temporary_redirect(location) View Source
temporary_redirect(String.t()) :: Sap.Combinators.combinator()

Server sent this response to directing client to get requested resource to another URI with same method that used prior request. This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.