ledger-core
Public Member Functions | List of all members
ledger::core::api::HttpUrlConnection Class Referenceabstract

#include <HttpUrlConnection.hpp>

Public Member Functions

virtual int32_t getStatusCode ()=0
 
virtual std::string getStatusText ()=0
 
virtual std::unordered_map< std::string, std::string > getHeaders ()=0
 
virtual HttpReadBodyResult readBody ()=0
 

Detailed Description

Class representing an Http connection.

Member Function Documentation

◆ getHeaders()

virtual std::unordered_map<std::string, std::string> ledger::core::api::HttpUrlConnection::getHeaders ( )
pure virtual

Gets the HTTP response headers.

Returns
The HTTP response headers

◆ getStatusCode()

virtual int32_t ledger::core::api::HttpUrlConnection::getStatusCode ( )
pure virtual

Gets the HTTP response status code.

Returns
The HTTP response status code

◆ getStatusText()

virtual std::string ledger::core::api::HttpUrlConnection::getStatusText ( )
pure virtual

Gets the HTTP response status text.

Returns
The HTTP response status text

◆ readBody()

virtual HttpReadBodyResult ledger::core::api::HttpUrlConnection::readBody ( )
pure virtual

Reads available HTTP response body. This method will be called multiple times until it returns a empty bytes array.

Returns
A chunk of the body data wrapped into a HttpReadBodyResult (for error management)

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