10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::http::HTTPCall Class Referenceabstract

#include <HTTPCall.h>

Detailed Description

HTTP-call which executes the request and returns HTTPResponse.

Inheritance diagram for tenduke::http::HTTPCall:
tenduke::http::curl::LibCurlHTTPCall tenduke::test::mocks::HTTPCallMock

Public Member Functions

virtual std::unique_ptr< tenduke::http::HTTPResponseexecute ()=0
 Executes the call synchronously.
 

Member Function Documentation

◆ execute()

virtual std::unique_ptr< tenduke::http::HTTPResponse > tenduke::http::HTTPCall::execute ( )
pure virtual

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.

Implemented in tenduke::http::curl::LibCurlHTTPCall.


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