Module

Network.HTTP.Types.StatusCode

Package
purescript-http-types
Repository
chrisdotcode/purescript-http-types

#reasonPhraseFromString Source

reasonPhraseFromString :: String -> ReasonPhrase

Creates a 'ReasonPhrase' from a string. If the given string is a non-standard HTTP Reason Phrase, then a 'Custom' 'ReasonPhrase' is returned.

#StatusCode Source

newtype StatusCode

A type that represents an HTTP StatusCode. Consists of both it's code (e.g.: '400'), and it's Reason Phrase (e.g.: 'Bad Request').

Constructors

Instances

#status100 Source

status100 :: StatusCode

Continue

#status101 Source

status101 :: StatusCode

Switching Protocols

#status201 Source

#status202 Source

status202 :: StatusCode

Accepted

#status203 Source

status203 :: StatusCode

Non-Authoritative Information

#status204 Source

status204 :: StatusCode

No Content

#status205 Source

status205 :: StatusCode

Reset Content

#status206 Source

status206 :: StatusCode

Partial Content

#status300 Source

status300 :: StatusCode

Multiple Choices

#status301 Source

status301 :: StatusCode

Moved Permanently

#status302 Source

#status303 Source

status303 :: StatusCode

See Other

#status304 Source

status304 :: StatusCode

Not Modified

#status305 Source

status305 :: StatusCode

Use Proxy

#status307 Source

status307 :: StatusCode

Temporary Redirect

#status400 Source

status400 :: StatusCode

Bad Request

#status401 Source

status401 :: StatusCode

Unauthorized

#status402 Source

status402 :: StatusCode

Payment Required

#status403 Source

status403 :: StatusCode

Forbidden

#status404 Source

status404 :: StatusCode

Not Found

#status405 Source

status405 :: StatusCode

Method Not Allowed

#status406 Source

status406 :: StatusCode

Not Acceptable

#status407 Source

status407 :: StatusCode

Proxy Authentication Required

#status408 Source

status408 :: StatusCode

Request Timeout

#status409 Source

status409 :: StatusCode

Conflict

#status410 Source

#status411 Source

status411 :: StatusCode

Length Required

#status412 Source

status412 :: StatusCode

Precondition Failed

#status413 Source

status413 :: StatusCode

Payload Too Large

#status414 Source

status414 :: StatusCode

URI Too Long

#status415 Source

status415 :: StatusCode

Unsupported Media Type

#status416 Source

status416 :: StatusCode

Range Not Satisfiable

#status417 Source

status417 :: StatusCode

Expectation Failed

#status426 Source

status426 :: StatusCode

Upgrade Required

#status500 Source

status500 :: StatusCode

Internal Server Error

#status501 Source

status501 :: StatusCode

Not Implemented

#status502 Source

status502 :: StatusCode

Bad Gateway

#status503 Source

status503 :: StatusCode

Service Unavailable

#status504 Source

status504 :: StatusCode

Gateway Timeout

#status505 Source

status505 :: StatusCode

HTTP Version Not Supported

#getRecognizedStatusCodeFromInt Source

getRecognizedStatusCodeFromInt :: Int -> Maybe StatusCode

Returns a standard 'StatusCode' if the given integer correlates to a standard status code number. Returns 'Nothing' otherwise.

#statusCodeFromString Source

statusCodeFromString :: String -> Maybe StatusCode

Returns a 'StatusCode' if the given string can be coerced into one. The expected string format is Status-Code SP Reason-Phrase (e.g.: '400 Bad Request') (from RFC 2616, section 6.1).