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

Safe HaskellSafe-Inferred
LanguageHaskell98

Network.HTTP.Types.Method

Synopsis

Documentation

type Method = ByteString Source

HTTP method (flat string type).

methodGet :: Method Source

HTTP Method constants.

methodPost :: Method Source

HTTP Method constants.

methodHead :: Method Source

HTTP Method constants.

methodPut :: Method Source

HTTP Method constants.

methodDelete :: Method Source

HTTP Method constants.

methodTrace :: Method Source

HTTP Method constants.

methodConnect :: Method Source

HTTP Method constants.

methodOptions :: Method Source

HTTP Method constants.

methodPatch :: Method Source

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 StdMethod Source

Convert a method ByteString to a StdMethod if possible.

renderMethod :: Either ByteString StdMethod -> Method Source

Convert an algebraic method to a ByteString.

renderStdMethod :: StdMethod -> Method Source

Convert a StdMethod to a ByteString.