ContentDecoder


Object Hierarchy:

Soup.ContentDecoder Soup.ContentDecoder Soup.ContentDecoder GLib.Object GLib.Object GLib.Object->Soup.ContentDecoder Soup.SessionFeature Soup.SessionFeature Soup.SessionFeature->Soup.ContentDecoder

Description:

[ CCode ( type_id = "soup_content_decoder_get_type ()" ) ]
public sealed class ContentDecoder : Object, SessionFeature

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 [ [email protected]_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.)


Namespace: Soup
Package: libsoup-3.0

Content:

Creation methods:

Inherited Members:

All known members inherited from class GLib.Object



2022 vala-language.org