http_request Class
Represents an HTTP request.
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 http://casablanca.codeplex.com/documentation.
class http_request;
Members
Public Constructors
Name |
Description |
---|---|
Overloaded. Constructs a new HTTP request with the given request method. |
|
Destructor frees any held resources. |
Public Methods
Name |
Description |
---|---|
Produces a stream which the caller may use to retrieve data from an incoming request. |
|
Signals the user (client) when all the data for this request message has been received. |
|
Extracts the body of the request message into a json value, checking that the content type is application\json. A body can only be extracted once because in some cases an optimization is made where the data is 'moved' out. |
|
Extract the body of the request message as a string value, checking that the content type is a MIME text type. A body can only be extracted once because in some cases an optimization is made where the data is 'moved' out. |
|
Extract the body of the response message into a vector of bytes. Extracting a vector can be done on |
|
Gets a task representing the response that will eventually be sent. |
|
Overloaded. Gets a reference to the headers of the response message. |
|
Get the method (GET/PUT/POST/DELETE) of the request message. |
|
Gets a reference the URI path, query, and fragment part of this request message. This will be appended to the base URI specified at construction of the http_client. |
|
Overloaded. Asynchronously responses to this HTTP request. |
|
Get the underling URI of the request message. |
|
Overloaded. Sets the body of the message to a textual string and set the "Content-Type" header. Assumes the character encoding of the string is the OS's default code page and will perform appropriate conversions to UTF-8. |
|
Get the method (GET/PUT/POST/DELETE) of the request message. |
|
Set the underling URI of the request message. |
|
Defines a stream that will be relied on to hold the body of the HTTP response message that results from the request. |
|
Generates a string representation of the message, including the body when possible. |
Public Operators
Name |
Description |
---|---|
Assignment operator. |
Requirements
Header: http_msg.h
Namespace: web::http