gi-soup-3.0.2: Libsoup bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Soup.Objects.ContentDecoder

Description

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

Exported types

newtype ContentDecoder Source #

Memory-managed wrapper type.

Constructors

ContentDecoder (ManagedPtr ContentDecoder) 

Instances

Instances details
Eq ContentDecoder Source # 
Instance details

Defined in GI.Soup.Objects.ContentDecoder

GObject ContentDecoder Source # 
Instance details

Defined in GI.Soup.Objects.ContentDecoder

ManagedPtrNewtype ContentDecoder Source # 
Instance details

Defined in GI.Soup.Objects.ContentDecoder

TypedObject ContentDecoder Source # 
Instance details

Defined in GI.Soup.Objects.ContentDecoder

Methods

glibType :: IO GType

HasParentTypes ContentDecoder Source # 
Instance details

Defined in GI.Soup.Objects.ContentDecoder

IsGValue (Maybe ContentDecoder) Source #

Convert ContentDecoder to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Soup.Objects.ContentDecoder

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe ContentDecoder -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe ContentDecoder)

type ParentTypes ContentDecoder Source # 
Instance details

Defined in GI.Soup.Objects.ContentDecoder

type ParentTypes ContentDecoder = '[Object, SessionFeature]

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

Instances details
(GObject o, IsDescendantOf ContentDecoder o) => IsContentDecoder o Source # 
Instance details

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