Network.HTTP.Types.Header

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

Safe Haskell | None
Language | Haskell98

Network.HTTP.Types.Header

Contents

- Types
- Common headers
- Byte ranges

Synopsis

- type Header = (HeaderName, ByteString)
- type HeaderName = CI ByteString
- type RequestHeaders = [Header]
- type ResponseHeaders = [Header]
- hAccept :: HeaderName
- hAcceptCharset :: HeaderName
- hAcceptEncoding :: HeaderName
- hAcceptLanguage :: HeaderName
- hAcceptRanges :: HeaderName
- hAge :: HeaderName
- hAllow :: HeaderName
- hAuthorization :: HeaderName
- hCacheControl :: HeaderName
- hConnection :: HeaderName
- hContentEncoding :: HeaderName
- hContentLanguage :: HeaderName
- hContentLength :: HeaderName
- hContentLocation :: HeaderName
- hContentMD5 :: HeaderName
- hContentRange :: HeaderName
- hContentType :: HeaderName
- hCookie :: HeaderName
- hDate :: HeaderName
- hETag :: HeaderName
- hExpect :: HeaderName
- hExpires :: HeaderName
- hFrom :: HeaderName
- hHost :: HeaderName
- hIfMatch :: HeaderName
- hIfModifiedSince :: HeaderName
- hIfNoneMatch :: HeaderName
- hIfRange :: HeaderName
- hIfUnmodifiedSince :: HeaderName
- hLastModified :: HeaderName
- hLocation :: HeaderName
- hMaxForwards :: HeaderName
- hPragma :: HeaderName
- hProxyAuthenticate :: HeaderName
- hProxyAuthorization :: HeaderName
- hRange :: HeaderName
- hReferer :: HeaderName
- hRetryAfter :: HeaderName
- hServer :: HeaderName
- hTE :: HeaderName
- hTrailer :: HeaderName
- hTransferEncoding :: HeaderName
- hUpgrade :: HeaderName
- hUserAgent :: HeaderName
- hVary :: HeaderName
- hVia :: HeaderName
- hWWWAuthenticate :: HeaderName
- hWarning :: HeaderName
- data ByteRange
  - = ByteRangeFrom !Integer
  - | ByteRangeFromTo !Integer !Integer
  - | ByteRangeSuffix !Integer
- renderByteRangeBuilder :: ByteRange -> Builder
- renderByteRange :: ByteRange -> ByteString
- type ByteRanges = [ByteRange]
- renderByteRangesBuilder :: ByteRanges -> Builder
- renderByteRanges :: ByteRanges -> ByteString

## Types

type Header = (HeaderName, ByteString)

Header

type HeaderName = CI ByteString

Header name

type RequestHeaders = [Header]

Request Headers

type ResponseHeaders = [Header]

Response Headers

## Common headers

hAccept :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hAcceptCharset :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hAcceptEncoding :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hAcceptLanguage :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hAcceptRanges :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hAge :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hAllow :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hAuthorization :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hCacheControl :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hConnection :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hContentEncoding :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hContentLanguage :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hContentLength :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hContentLocation :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hContentMD5 :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hContentRange :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hContentType :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hCookie :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hDate :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hETag :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hExpect :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hExpires :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hFrom :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hHost :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hIfMatch :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hIfModifiedSince :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hIfNoneMatch :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hIfRange :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hIfUnmodifiedSince :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hLastModified :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hLocation :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hMaxForwards :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hPragma :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hProxyAuthenticate :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hProxyAuthorization :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hRange :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hReferer :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hRetryAfter :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hServer :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hTE :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hTrailer :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hTransferEncoding :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hUpgrade :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hUserAgent :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hVary :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hVia :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hWWWAuthenticate :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

hWarning :: HeaderName

HTTP Header names According to http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

## Byte ranges

data ByteRange

RFC 2616 Byte range (individual).

Negative indices are not allowed!

Constructors

ByteRangeFrom !Integer |
ByteRangeFromTo !Integer !Integer |
ByteRangeSuffix !Integer |

Instances

Eq ByteRange |
Data ByteRange |
Ord ByteRange |
Show ByteRange |

renderByteRangeBuilder :: ByteRange -> Builder

renderByteRange :: ByteRange -> ByteString

type ByteRanges = [ByteRange]

RFC 2616 Byte ranges (set).

renderByteRangesBuilder :: ByteRanges -> Builder

renderByteRanges :: ByteRanges -> ByteString