Network.HTTP.Types.Method

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

Safe Haskell | Safe-Inferred
Language | Haskell98

Network.HTTP.Types.Method

Synopsis

- type Method = ByteString
- methodGet :: Method
- methodPost :: Method
- methodHead :: Method
- methodPut :: Method
- methodDelete :: Method
- methodTrace :: Method
- methodConnect :: Method
- methodOptions :: Method
- methodPatch :: Method
- data StdMethod
  - = GET
  - | POST
  - | HEAD
  - | PUT
  - | DELETE
  - | TRACE
  - | CONNECT
  - | OPTIONS
  - | PATCH
- parseMethod :: Method -> Either ByteString StdMethod
- renderMethod :: Either ByteString StdMethod -> Method
- renderStdMethod :: StdMethod -> Method

# Documentation

type Method = ByteString #

HTTP method (flat string type).

methodGet :: Method #

HTTP Method constants.

methodPost :: Method #

HTTP Method constants.

methodHead :: Method #

HTTP Method constants.

methodPut :: Method #

HTTP Method constants.

methodDelete :: Method #

HTTP Method constants.

methodTrace :: Method #

HTTP Method constants.

methodConnect :: Method #

HTTP Method constants.

methodOptions :: Method #

HTTP Method constants.

methodPatch :: Method #

HTTP Method constants.

data StdMethod #

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 |

#### Instances

Instances details

Bounded StdMethod # |
Instance details Defined in Network.HTTP.Types.Method Methods minBound :: StdMethod maxBound :: StdMethod
Enum StdMethod # |
Instance details Defined in Network.HTTP.Types.Method Methods succ :: StdMethod -> StdMethod pred :: StdMethod -> StdMethod toEnum :: Int -> StdMethod fromEnum :: StdMethod -> Int enumFrom :: StdMethod -> [StdMethod] enumFromThen :: StdMethod -> StdMethod -> [StdMethod] enumFromTo :: StdMethod -> StdMethod -> [StdMethod] enumFromThenTo :: StdMethod -> StdMethod -> StdMethod -> [StdMethod]
Ix StdMethod # |
Instance details Defined in Network.HTTP.Types.Method Methods range :: (StdMethod, StdMethod) -> [StdMethod] index :: (StdMethod, StdMethod) -> StdMethod -> Int unsafeIndex :: (StdMethod, StdMethod) -> StdMethod -> Int inRange :: (StdMethod, StdMethod) -> StdMethod -> Bool rangeSize :: (StdMethod, StdMethod) -> Int unsafeRangeSize :: (StdMethod, StdMethod) -> Int
Read StdMethod # |
Instance details Defined in Network.HTTP.Types.Method Methods readsPrec :: Int -> ReadS StdMethod readList :: ReadS [StdMethod] readPrec :: ReadPrec StdMethod readListPrec :: ReadPrec [StdMethod]
Show StdMethod # |
Instance details Defined in Network.HTTP.Types.Method Methods showsPrec :: Int -> StdMethod -> ShowS show :: StdMethod -> String showList :: [StdMethod] -> ShowS
Eq StdMethod # |
Instance details Defined in Network.HTTP.Types.Method Methods (==) :: StdMethod -> StdMethod -> Bool (/=) :: StdMethod -> StdMethod -> Bool
Ord StdMethod # |
Instance details Defined in Network.HTTP.Types.Method Methods compare :: StdMethod -> StdMethod -> Ordering (<) :: StdMethod -> StdMethod -> Bool (<=) :: StdMethod -> StdMethod -> Bool (>) :: StdMethod -> StdMethod -> Bool (>=) :: StdMethod -> StdMethod -> Bool max :: StdMethod -> StdMethod -> StdMethod min :: StdMethod -> StdMethod -> StdMethod

parseMethod :: Method -> Either ByteString StdMethod #

Convert a method `ByteString` to a `StdMethod` if possible.

renderMethod :: Either ByteString StdMethod -> Method #

Convert an algebraic method to a `ByteString`.

renderStdMethod :: StdMethod -> Method #

Convert a `StdMethod` to a `ByteString`.