1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::SessionFeature;

glib::wrapper! {
    /// Handles decoding of HTTP messages.
    ///
    /// #SoupContentDecoder 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 #SoupContentDecoder will automatically be
    /// added to the session by default. (You can use
    /// [`SessionExt::remove_feature_by_type()`][crate::prelude::SessionExt::remove_feature_by_type()] if you don't
    /// want this.)
    ///
    /// If #SoupContentDecoder 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
    /// #SoupContentDecoder 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.)
    ///
    /// # Implements
    ///
    /// [`trait@glib::ObjectExt`], [`SessionFeatureExt`][trait@crate::prelude::SessionFeatureExt]
    #[doc(alias = "SoupContentDecoder")]
    pub struct ContentDecoder(Object<ffi::SoupContentDecoder, ffi::SoupContentDecoderClass>) @implements SessionFeature;

    match fn {
        type_ => || ffi::soup_content_decoder_get_type(),
    }
}

impl ContentDecoder {}