Kurlyk
Loading...
Searching...
No Matches
kurlyk::HttpRequestContext Class Reference

Represents the context of an HTTP request, including the request object, callback function, retry attempts, and timing. More...

#include <HttpRequestContext.hpp>

Public Types

using time_point_t = std::chrono::steady_clock::time_point
 

Public Member Functions

 HttpRequestContext (std::unique_ptr< HttpRequest > request_ptr, HttpResponseCallback callback)
 Constructs a HttpRequestContext with the specified request and callback.
 
 HttpRequestContext ()=default
 

Public Attributes

std::unique_ptr< HttpRequestrequest
 The HTTP request associated with this context.
 
HttpResponseCallback callback
 Callback function to be invoked when the request completes.
 
long retry_attempt
 Number of retry attempts made for this request.
 
time_point_t start_time
 Time when the request was initially created or last retried.
 

Detailed Description

Represents the context of an HTTP request, including the request object, callback function, retry attempts, and timing.

Definition at line 12 of file HttpRequestContext.hpp.

Member Typedef Documentation

◆ time_point_t

using kurlyk::HttpRequestContext::time_point_t = std::chrono::steady_clock::time_point

Definition at line 14 of file HttpRequestContext.hpp.

Constructor & Destructor Documentation

◆ HttpRequestContext() [1/2]

kurlyk::HttpRequestContext::HttpRequestContext ( std::unique_ptr< HttpRequest > request_ptr,
HttpResponseCallback callback )
inline

Constructs a HttpRequestContext with the specified request and callback.

Parameters
request_ptrA unique pointer to the HTTP request object.
callbackCallback function to be invoked upon request completion.

Definition at line 24 of file HttpRequestContext.hpp.

◆ HttpRequestContext() [2/2]

kurlyk::HttpRequestContext::HttpRequestContext ( )
default

Member Data Documentation

◆ callback

HttpResponseCallback kurlyk::HttpRequestContext::callback

Callback function to be invoked when the request completes.

Definition at line 17 of file HttpRequestContext.hpp.

◆ request

std::unique_ptr<HttpRequest> kurlyk::HttpRequestContext::request

The HTTP request associated with this context.

Definition at line 16 of file HttpRequestContext.hpp.

◆ retry_attempt

long kurlyk::HttpRequestContext::retry_attempt

Number of retry attempts made for this request.

Definition at line 18 of file HttpRequestContext.hpp.

◆ start_time

time_point_t kurlyk::HttpRequestContext::start_time

Time when the request was initially created or last retried.

Definition at line 19 of file HttpRequestContext.hpp.


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