Gjsify LogoGjsify Logo

A #SoupClientContext provides additional information about the client making a particular request. In particular, you can use soup_client_context_get_auth_domain() and soup_client_context_get_auth_user() to determine if HTTP authentication was used successfully.

soup_client_context_get_remote_address() and/or soup_client_context_get_host() can be used to get information for logging or debugging purposes. soup_client_context_get_gsocket() may also be of use in some situations (eg, tracking when multiple requests are made on the same connection).

record

Hierarchy

  • ClientContext

Index

Constructors

Properties

name: string

Methods

  • Checks whether the request associated with client has been authenticated, and if so returns the #SoupAuthDomain that authenticated it.

    Returns Soup.AuthDomain

  • getAuthUser(): string
  • Checks whether the request associated with client has been authenticated, and if so returns the username that the client authenticated as.

    Returns string

  • Retrieves the #GSocket that client is associated with.

    If you are using this method to observe when multiple requests are made on the same persistent HTTP connection (eg, as the ntlm-test test program does), you will need to pay attention to socket destruction as well (eg, by using weak references), so that you do not get fooled when the allocator reuses the memory address of a previously-destroyed socket to represent a new socket.

    Returns Gio.Socket

  • getHost(): string
  • Retrieves the IP address associated with the remote end of a connection.

    Returns string

  • Retrieves the #SoupSocket that client is associated with.

    If you are using this method to observe when multiple requests are made on the same persistent HTTP connection (eg, as the ntlm-test test program does), you will need to pay attention to socket destruction as well (either by using weak references, or by connecting to the #SoupSocket::disconnected signal), so that you do not get fooled when the allocator reuses the memory address of a previously-destroyed socket to represent a new socket.

    Returns Soup.Socket

  • "Steals" the HTTP connection associated with client from its #SoupServer. This happens immediately, regardless of the current state of the connection; if the response to the current #SoupMessage has not yet finished being sent, then it will be discarded; you can steal the connection from a #SoupMessage:wrote-informational or #SoupMessage:wrote-body signal handler if you need to wait for part or all of the response to be sent.

    Note that when calling this function from C, client will most likely be freed as a side effect.

    Returns IOStream

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