|
10Duke Enterprise C++ SDK
|
#include <Win32HTTPCall.h>
Win32 implementation of tenduke::http::HTTPCall.
Public Member Functions | |
| Win32HTTPCall (const std::shared_ptr< const ::tenduke::http::HTTPRequest > &httpRequest, const std::shared_ptr< const ::tenduke::http::win::WinHttpSession > &session, const ::tenduke::net::URLs &urls, std::size_t maxResponseBodySize=::tenduke::http::DEFAULT_MAX_RESPONSE_BODY_SIZE) | |
| Constructs new instance. | |
| std::unique_ptr<::tenduke::http::HTTPResponse > | execute () override |
| Executes the call synchronously. | |
Protected Member Functions | |
| virtual std::unique_ptr<::tenduke::http::win::InternetHandle > | connect () |
| virtual std::multimap< std::string, std::string > | getResponseHeaders (const ::tenduke::http::win::WinHttpRequest &request) |
| virtual std::unique_ptr<::tenduke::http::win::WinHttpRequest > | openRequest (::tenduke::http::win::InternetHandle &connection) |
| virtual std::unique_ptr<::tenduke::utl::BinaryData > | readResponseBody (const ::tenduke::http::win::WinHttpRequest &request) |
| virtual void | setRequestHeaders (::tenduke::http::win::WinHttpRequest &request) |
| void | startDeadline (long timeoutMs) |
| Sets the time by which the request must complete, measured from now. | |
| tenduke::http::win::Win32HTTPCall::Win32HTTPCall | ( | const std::shared_ptr< const ::tenduke::http::HTTPRequest > & | httpRequest, |
| const std::shared_ptr< const ::tenduke::http::win::WinHttpSession > & | session, | ||
| const ::tenduke::net::URLs & | urls, | ||
| std::size_t | maxResponseBodySize = ::tenduke::http::DEFAULT_MAX_RESPONSE_BODY_SIZE ) |
Constructs new instance.
| httpRequest | - |
| session | - |
| urls | - |
| maxResponseBodySize | maximum size of the response body in bytes, a larger response is aborted |
|
overridevirtual |
Executes the call synchronously.
NOTE: This is blocking call.
| tenduke::net::NetworkingException | (or subclasses) when the call fails for various networking reasons like "no such host", "network timeout", "networking connection broken" and so on. Some of these are transient and thus re-triable, some indicate configuration error. |
| tenduke::net::HTTPRequestException | when the call fails for various reasons, see documentation for the exception for details. NOTE HTTPCall does not throw exception if the request technically succeeds, but the server returns HTTP status code >= 400. It is responsibility of the caller to interpret the status code and act accordingly. |
Implements tenduke::http::HTTPCall.
|
protected |
Sets the time by which the request must complete, measured from now.
0 means no deadline.