http_client Class

HTTP client class, used to maintain a connection to an HTTP service for an extended session.

Warning

This topic contains information for the C++ REST SDK 1.0 (codename "Casablanca"). If you are using a later version from the Codeplex Casablanca web page, then use the local documentation at https://casablanca.codeplex.com/documentation.

class http_client;

Members

Public Constructors

Name

Description

http_client::http_client Constructor

Overloaded. Creates a new http_client connected to specified uri.

http_client::~http_client Destructor

Note the destructor doesn't necessarily close the connection and release resources. The connection is reference counted with the http_responses.

Public Methods

Name

Description

http_client::add_handler Method

Overloaded. Add an HTTP pipeline stage to the client.

http_client::client_config Method

Get client configuration object

http_client::request Method

Overloaded. Asynchronously sends an HTTP request.

Requirements

Header: http_client.h, http_msg.h

Namespace: web::http::client

See Also

Reference

web::http::client Namespace