Gjsify LogoGjsify Logo

Hierarchy

  • ServerCallback

Callable

  • A callback used to handle requests to a #SoupServer.

    path and query contain the likewise-named components of the Request-URI, subject to certain assumptions. By default, #SoupServer decodes all percent-encoding in the URI path, such that "/foo%2Fbar" is treated the same as "/foo/bar". If your server is serving resources in some non-POSIX-filesystem namespace, you may want to distinguish those as two distinct paths. In that case, you can set the SoupServer:raw-paths property when creating the #SoupServer, and it will leave those characters undecoded.

    query contains the query component of the Request-URI parsed according to the rules for HTML form handling. Although this is the only commonly-used query string format in HTTP, there is nothing that actually requires that HTTP URIs use that format; if your server needs to use some other format, you can just ignore query, and call soup_message_get_uri() and parse the URI's query field yourself.

    See soup_server_add_handler() and soup_server_add_early_handler() for details of what handlers can/should do.

    Parameters

    • server: Soup.Server

      the #SoupServer

    • msg: ServerMessage

      the message being processed

    • path: string

      the path component of msg's Request-URI

    • query: HashTable<string | number | symbol, string | number | boolean>

      the parsed query component of msg's Request-URI

    Returns void

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