Crate soup

Source

Re-exports§

pub use ffi;
pub use gio;
pub use glib;

Modules§

builders
prelude

Structs§

Auth
The abstract base class for handling authentication.
AuthBasic
HTTP “Basic” authentication.
AuthDigest
HTTP “Digest” authentication.
AuthDomain
Server-side authentication.
AuthDomainBasic
Server-side “Basic” authentication.
AuthDomainDigest
Server-side “Digest” authentication.
AuthManager
HTTP client-side authentication handler.
AuthNTLM
HTTP-based NTLM authentication.
AuthNegotiate
HTTP-based GSS-Negotiate authentication, as defined by RFC 4559.
Cache
File-based cache for HTTP resources.
Cacheability
Indicates if a message should or shouldn’t be cached.
ContentDecoder
Handles decoding of HTTP messages.
ContentSniffer
Sniffs the mime type of messages.
Cookie
Implements HTTP cookies, as described by RFC 6265.
CookieJar
Automatic cookie handling for SoupSession.
CookieJarDB
Database-based Cookie Jar.
CookieJarText
Text-file-based (“cookies.txt”) Cookie Jar
Expectation
Represents the parsed value of the “Expect” header.
HSTSEnforcer
Automatic HTTP Strict Transport Security enforcing for Session.
HSTSEnforcerDB
Persistent HTTP Strict Transport Security enforcer.
HSTSPolicy
HSTSPolicy implements HTTP policies, as described by RFC 6797.
Logger
Debug logging support
Message
Represents an HTTP message being sent or received.
MessageBody
MessageBody represents the request or response body of a Message.
MessageFlags
Various flags that can be set on a Message to alter its behavior.
MessageHeaders
The HTTP message headers associated with a request or response.
MessageMetrics
Contains metrics collected while loading a Message either from the network or the disk cache.
Multipart
Represents a multipart HTTP message body, parsed according to the syntax of RFC 2046.
MultipartInputStream
Handles streams of multipart messages.
Server
Server provides a basic implementation of an HTTP server. The recommended usage of this server is for internal use, tasks like a mock server for tests, a private service for IPC, etc. It is not recommended to be exposed to untrusted clients as it may be vulnerable to denial of service attacks or other exploits.
ServerListenOptions
Options to pass to ServerExt::listen(), etc.
ServerMessage
An HTTP server request and response pair.
Session
Soup session state object.
SessionFeature
Interface for miscellaneous Session features.
WebsocketConnection
The WebSocket Protocol
WebsocketExtension
A WebSocket extension
WebsocketExtensionDeflate
A SoupWebsocketExtensionDeflate is a WebsocketExtension implementing permessage-deflate (RFC 7692).
WebsocketExtensionManager
SoupWebsocketExtensionManager is the SessionFeature that handles WebSockets extensions for a Session.

Enums§

CacheType
The type of cache; this affects what kinds of responses will be saved.
CookieJarAcceptPolicy
The policy for accepting or rejecting cookies returned in responses.
DateFormat
Date formats that date_time_to_string() can use.
Encoding
How a message body is encoded for transport
HTTPVersion
Indicates the HTTP protocol version being used.
LoggerLogLevel
Describes the level of logging output to provide.
MemoryUse
The lifetime of the memory being passed.
MessageHeadersType
Value passed to MessageHeaders::new() to set certain default behaviors.
MessagePriority
Priorities that can be set on a Message to instruct the message queue to process it before any other message with lower priority.
SameSitePolicy
Represents the same-site policies of a cookie.
SessionError
A Session error.
Status
These represent the known HTTP status code values, plus various network and internal errors.
TLDError
Error codes for SOUP_TLD_ERROR.
URIComponent
Enum values passed to uri_copy() to indicate the components of the URI that should be updated with the given values.
WebsocketCloseCode
Pre-defined close codes that can be passed to WebsocketConnection::close() or received from WebsocketConnection::close_code().
WebsocketConnectionType
The type of a WebsocketConnection.
WebsocketDataType
The type of data contained in a message signal.
WebsocketError
WebSocket-related errors.
WebsocketState
The state of the WebSocket connection.

Statics§

FORM_MIME_TYPE_MULTIPART
A macro containing the value multipart/form-data; the MIME type used for posting form data that contains files to be uploaded.
FORM_MIME_TYPE_URLENCODED
A macro containing the value application/x-www-form-urlencoded; the default MIME type for POSTing HTML form data.

Functions§

check_version
Like CHECK_VERSION(), but the check for soup_check_version is at runtime instead of compile time.
cookies_from_request
Parses @msg’s Cookie request header and returns a glib::SList of SoupCookies.
cookies_from_response
Parses @msg’s Set-Cookie response headers and returns a glib::SList of SoupCookies.
date_time_new_from_http_string
Parses @date_string and tries to extract a date from it.
date_time_to_string
Converts @date to a string in the format described by @format.
header_contains
Parses @header to see if it contains the token @token (matched case-insensitively).
header_g_string_append_param
Appends something like name=value to @string, taking care to quote @value if needed, and if so, to escape any quotes or backslashes in @value.
header_g_string_append_param_quoted
Appends something like name="value" to @string, taking care to escape any quotes or backslashes in @value.
header_parse_list
Parses a header whose content is described by RFC2616 as #something.
headers_parse
Parses the headers of an HTTP request or response in @str and stores the results in @dest.
headers_parse_request
Parses the headers of an HTTP request in @str and stores the results in @req_method, @req_path, @ver, and @req_headers.
headers_parse_response
Parses the headers of an HTTP response in @str and stores the results in @ver, @status_code, @reason_phrase, and @headers.
headers_parse_status_line
Parses the HTTP Status-Line string in @status_line into @ver, @status_code, and @reason_phrase.
major_version
Returns the major version number of the libsoup library.
micro_version
Returns the micro version number of the libsoup library.
minor_version
Returns the minor version number of the libsoup library.
tld_domain_is_public_suffix
Looks whether the @domain passed as argument is a public domain suffix (.org, .com, .co.uk, etc) or not.
tld_get_base_domain
Finds the base domain for a given @hostname
uri_decode_data_uri
Decodes the given data URI and returns its contents and @content_type.
uri_equal