Wt: Wt::Http::WtClient Class Reference

Wt 4.10.4

Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
Wt::Http::WtClient Class Reference
HTTP protocol (Wt::Http)

Support for a Wt web application client. More...

`#include <Wt/Http/WtClient.h>`

## Public Types
enum class | ClientOption { SupportsAjax = 0x1 }
| Enumeration for client user-agent options. More...

## Static Public Member Functions
static void | startWtSession (const std::string &host, const std::string &port, const std::string &path, const std::string &query=std::string(), WFlags< ClientOption > flags=ClientOption::SupportsAjax)
| Starts a Wt session.

## Detailed Description

Support for a Wt web application client.

Note
  This class provides a utility to bootstrap a Wt session, but does not deal with new developments related to the bootstrap procedure such as progressive bootstrap.

## Member Enumeration Documentation

## ◆ ClientOption

enum class Wt::Http::WtClient::ClientOption
| strong

Enumeration for client user-agent options.

Enumerator
SupportsAjax | Flag that indicates supports for AJAX.

## Member Function Documentation

## ◆ startWtSession()

static void Wt::Http::WtClient::startWtSession | ( | const std::string & | host,
|  | const std::string & | port,
|  | const std::string & | path,
|  | const std::string & | query = std::string(),
|  | WFlags< ClientOption > | flags = ClientOption::SupportsAjax )
| static

Starts a Wt session.

A Wt application uses a bootstrap procedure during which it collects information on user agent capabilities (unless the progressive bootstrap method is enabled). Therefore a session is not spawned after the first request, but only after these capabilities have been collected by a second request.

This function starts a session on the specific `host`, `port`, `path`, and optional `query`. These correspond to the different parts of a url:

`http://`host`:`port/path`?``query`.