http-types-0.8.2: Generic HTTP types for Haskell (for both client and server code).

Safe HaskellSafe-Inferred

Network.HTTP.Types.Method

Synopsis

Documentation

type Method = ByteStringSource

HTTP method (flat string type).

methodGet :: MethodSource

HTTP Method constants.

methodPost :: MethodSource

HTTP Method constants.

methodHead :: MethodSource

HTTP Method constants.

methodPut :: MethodSource

HTTP Method constants.

methodDelete :: MethodSource

HTTP Method constants.

methodTrace :: MethodSource

HTTP Method constants.

methodConnect :: MethodSource

HTTP Method constants.

methodOptions :: MethodSource

HTTP Method constants.

methodPatch :: MethodSource

HTTP Method constants.

data StdMethod Source

HTTP standard method (as defined by RFC 2616, and PATCH which is defined by RFC 5789).

Constructors

GET 
POST 
HEAD 
PUT 
DELETE 
TRACE 
CONNECT 
OPTIONS 
PATCH 

parseMethod :: Method -> Either ByteString StdMethodSource

Convert a method ByteString to a StdMethod if possible.

renderMethod :: Either ByteString StdMethod -> MethodSource

Convert an algebraic method to a ByteString.

renderStdMethod :: StdMethod -> MethodSource

Convert a StdMethod to a ByteString.