Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Handles decoding of HTTP messages.
ContentDecoder
handles adding the "Accept-Encoding" header on
outgoing messages, and processing the "Content-Encoding" header on
incoming ones. Currently it supports the "gzip", "deflate", and "br"
content codings.
A ContentDecoder
will automatically be
added to the session by default. (You can use
[methodsession
.remove_feature_by_type] if you don't
want this.)
If ContentDecoder
successfully decodes the Content-Encoding,
the message body will contain the decoded data; however, the message headers
will be unchanged (and so "Content-Encoding" will still be present,
"Content-Length" will describe the original encoded length, etc).
If "Content-Encoding" contains any encoding types that
ContentDecoder
doesn't recognize, then none of the encodings
will be decoded.
(Note that currently there is no way to (automatically) use Content-Encoding when sending a request body, or to pick specific encoding types to support.)
Synopsis
- newtype ContentDecoder = ContentDecoder (ManagedPtr ContentDecoder)
- class (GObject o, IsDescendantOf ContentDecoder o) => IsContentDecoder o
- toContentDecoder :: (MonadIO m, IsContentDecoder o) => o -> m ContentDecoder
Exported types
newtype ContentDecoder Source #
Memory-managed wrapper type.
ContentDecoder (ManagedPtr ContentDecoder) |
Instances
Eq ContentDecoder Source # | |
Defined in GI.Soup.Objects.ContentDecoder (==) :: ContentDecoder -> ContentDecoder -> Bool # (/=) :: ContentDecoder -> ContentDecoder -> Bool # | |
GObject ContentDecoder Source # | |
Defined in GI.Soup.Objects.ContentDecoder | |
ManagedPtrNewtype ContentDecoder Source # | |
Defined in GI.Soup.Objects.ContentDecoder toManagedPtr :: ContentDecoder -> ManagedPtr ContentDecoder | |
TypedObject ContentDecoder Source # | |
Defined in GI.Soup.Objects.ContentDecoder | |
HasParentTypes ContentDecoder Source # | |
Defined in GI.Soup.Objects.ContentDecoder | |
IsGValue (Maybe ContentDecoder) Source # | Convert |
Defined in GI.Soup.Objects.ContentDecoder gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ContentDecoder -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ContentDecoder) | |
type ParentTypes ContentDecoder Source # | |
Defined in GI.Soup.Objects.ContentDecoder |
class (GObject o, IsDescendantOf ContentDecoder o) => IsContentDecoder o Source #
Type class for types which can be safely cast to ContentDecoder
, for instance with toContentDecoder
.
Instances
(GObject o, IsDescendantOf ContentDecoder o) => IsContentDecoder o Source # | |
Defined in GI.Soup.Objects.ContentDecoder |
toContentDecoder :: (MonadIO m, IsContentDecoder o) => o -> m ContentDecoder Source #
Cast to ContentDecoder
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getProperty, getQdata.