Gjsify LogoGjsify Logo

Hierarchy

Index

Properties

accept_language?: string

If non-%NULL, the value to use for the "Accept-Language" header on #SoupMessages sent from this session.

Setting this will disable #SoupSession:accept-language-auto.

accept_language_auto?: boolean

If %TRUE, #SoupSession will automatically set the string for the "Accept-Language" header on every #SoupMessage sent, based on the return value of g_get_language_names().

Setting this will override any previous value of #SoupSession:accept-language.

idle_timeout?: number

Connection lifetime (in seconds) when idle. Any connection left idle longer than this will be closed.

Although you can change this property at any time, it will only affect newly-created connections, not currently-open ones. You can call soup_session_abort() after setting this if you want to ensure that all future connections will have this timeout value.

local_address?: InetSocketAddress

Sets the #GInetSocketAddress to use for the client side of the connection.

Use this property if you want for instance to bind the local socket to a specific IP address.

max_conns?: number

The maximum number of connections that the session can open at once.

max_conns_per_host?: number

The maximum number of connections that the session can open at once to a given host.

proxy_resolver?: Gio.ProxyResolver

A #GProxyResolver to use with this session.

If no proxy resolver is set, then the default proxy resolver will be used. See g_proxy_resolver_get_default(). You can set it to %NULL if you don't want to use proxies, or set it to your own #GProxyResolver if you want to control what proxies get used.

remote_connectable?: SocketConnectable

Sets a socket to make outgoing connections on. This will override the default behaviour of opening TCP/IP sockets to the hosts specified in the URIs.

This function is not required for common HTTP usage, but only when connecting to a HTTP service that is not using standard TCP/IP sockets. An example of this is a local service that uses HTTP over UNIX-domain sockets, in that case a #GUnixSocketAddress can be passed to this function.

timeout?: number

The timeout (in seconds) for socket I/O operations (including connecting to a server, and waiting for a reply to an HTTP request).

Although you can change this property at any time, it will only affect newly-created connections, not currently-open ones. You can call soup_session_abort() after setting this if you want to ensure that all future connections will have this timeout value.

Not to be confused with #SoupSession:idle-timeout (which is the length of time that idle persistent connections will be kept open).

tls_database?: TlsDatabase

Sets the #GTlsDatabase to use for validating SSL/TLS certificates.

If no certificate database is set, then the default database will be used. See g_tls_backend_get_default_database().

tls_interaction?: TlsInteraction

A #GTlsInteraction object that will be passed on to any #GTlsConnections created by the session. (This can be used to provide client-side certificates, for example.)

user_agent?: string

If non-%NULL, the value to use for the "User-Agent" header on #SoupMessages sent from this session.

RFC 2616 says: "The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations. User agents SHOULD include this field with requests."

The User-Agent header contains a list of one or more product tokens, separated by whitespace, with the most significant product token coming first. The tokens must be brief, ASCII, and mostly alphanumeric (although "-", "_", and "." are also allowed), and may optionally include a "/" followed by a version string. You may also put comments, enclosed in parentheses, between or after the tokens.

If you set a #SoupSession:user_agent property that has trailing whitespace, #SoupSession will append its own product token (eg, "libsoup/2.3.2") to the end of the header for you.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method