10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::http::win::Win32HTTPCall Class Reference

#include <Win32HTTPCall.h>

Detailed Description

Win32 implementation of tenduke::http::HTTPCall.

Inheritance diagram for tenduke::http::win::Win32HTTPCall:
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::unique_ptr<::tenduke::http::HTTPResponseexecute () override
 Executes the call synchronously.
 

Protected Member Functions

virtual std::unique_ptr<::tenduke::http::win::InternetHandleconnect ()
 
virtual std::multimap< std::string, std::string > getResponseHeaders (const ::tenduke::http::win::WinHttpRequest &request)
 
virtual std::unique_ptr<::tenduke::http::win::WinHttpRequestopenRequest (::tenduke::http::win::InternetHandle &connection)
 
virtual std::unique_ptr<::tenduke::utl::BinaryDatareadResponseBody (const ::tenduke::http::win::WinHttpRequest &request)
 
virtual void setRequestHeaders (::tenduke::http::win::WinHttpRequest &request)
 

Member Function Documentation

◆ execute()

std::unique_ptr<::HTTPResponse > tenduke::http::win::Win32HTTPCall::execute ( )
overridevirtual

Executes the call synchronously.

NOTE: This is blocking call.

Returns
HTTP-response.
Exceptions
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::HTTPRequestExceptionwhen 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.


The documentation for this class was generated from the following files: