|
Network.HTTP.Headers | Portability | non-portable (not tested) | Stability | experimental | Maintainer | bjorn@bringert.net |
|
|
|
Description |
- Changes by Robin Bate Boerop robin@bateboerop.name:
- Made dependencies explicit in import statements.
- Removed false dependencies in import statements.
- Added missing type signatures.
- Created Network.HTTP.Headers from Network.HTTP modules.
See changes history and TODO list in Network.HTTP module.
- Host
-
Required by HTTP/1.1, if not supplied as part
of a request a default Host value is extracted
from the request-uri.
- Connection
-
If this header is present in any request or
response, and it's value is close, then
the current request/response is the last
to be allowed on that connection.
- Expect
-
Should a request contain a body, an Expect
header will be added to the request. The added
header has the value "100-continue". After
a 417 "Expectation Failed" response the request
is attempted again without this added Expect
header.
- TransferEncoding,ContentLength,...
-
if request is inconsistent with any of these
header values then you may not receive any response
or will generate an error response (probably 4xx).
|
|
Synopsis |
|
|
|
Documentation |
|
class HasHeaders x where | Source |
|
This class allows us to write generic header manipulation functions
for both Request and Response data types.
| | Methods | | | Instances | |
|
|
|
The Header data type pairs header names & values.
| Constructors | | Instances | |
|
|
|
HTTP Header Name type:
Why include this at all? I have some reasons
1) prevent spelling errors of header names,
2) remind everyone of what headers are available,
3) might speed up searches for specific headers.
Arguments against:
1) makes customising header names laborious
2) increases code volume.
| Constructors | HdrCacheControl | | HdrConnection | | HdrDate | | HdrPragma | | HdrTransferEncoding | | HdrUpgrade | | HdrVia | | HdrAccept | | HdrAcceptCharset | | HdrAcceptEncoding | | HdrAcceptLanguage | | HdrAuthorization | | HdrCookie | | HdrExpect | | HdrFrom | | HdrHost | | HdrIfModifiedSince | | HdrIfMatch | | HdrIfNoneMatch | | HdrIfRange | | HdrIfUnmodifiedSince | | HdrMaxForwards | | HdrProxyAuthorization | | HdrRange | | HdrReferer | | HdrUserAgent | | HdrAge | | HdrLocation | | HdrProxyAuthenticate | | HdrPublic | | HdrRetryAfter | | HdrServer | | HdrSetCookie | | HdrVary | | HdrWarning | | HdrWWWAuthenticate | | HdrAllow | | HdrContentBase | | HdrContentEncoding | | HdrContentLanguage | | HdrContentLength | | HdrContentLocation | | HdrContentMD5 | | HdrContentRange | | HdrContentType | | HdrETag | | HdrExpires | | HdrLastModified | | HdrContentTransferEncoding | | HdrCustom String | Allows for unrecognised or experimental headers.
|
| Instances | |
|
|
|
|
|
|
|
Inserts a header with the given name and value.
Allows duplicate header names.
Adds the new header only if no previous header shares
the same name.
Removes old headers with duplicate name.
Inserts multiple headers.
|
|
|
Gets a list of headers with a particular HeaderName.
|
|
|
|
|
Lookup presence of specific HeaderName in a list of Headers
Returns the value from the first matching header.
|
|
|
|
|
|
Produced by Haddock version 2.6.0 |