Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Aws::Auth::RequestContext Class Reference

Encapsulates the response from a curl request Curl uses a callback when performing a request for chunks of data. This class serves as a the request data, using an Aws::StringStream to accumulate data in memory. At any time, the GetValue() method can be used to return a Json::JsonValue respresentation of the currently buffered data. More...

Public Member Functions

Aws::Utils::Json::JsonValue GetValue ()
 Create a Json::JsonValue object from the current value of the buffer. More...
 
 RequestContext ()=default
 
 ~RequestContext ()=default
 

Static Public Member Functions

static size_t WriteData (char *ptr, size_t, size_t nmemb, void *userdata)
 Curl callback for CURLOPT_WRITEFUNCTION Recieves callbacks from the curl library any time data is received from a request. See https://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html for more info. More...
 

Private Attributes

Aws::StringStream stream_
 Current data that has be received so far. More...
 

Detailed Description

Encapsulates the response from a curl request Curl uses a callback when performing a request for chunks of data. This class serves as a the request data, using an Aws::StringStream to accumulate data in memory. At any time, the GetValue() method can be used to return a Json::JsonValue respresentation of the currently buffered data.

WARNING: This class will accumulate data, without

Definition at line 265 of file service_credentials_provider.cpp.

Constructor & Destructor Documentation

Aws::Auth::RequestContext::RequestContext ( )
default
Aws::Auth::RequestContext::~RequestContext ( )
default

Member Function Documentation

Aws::Utils::Json::JsonValue Aws::Auth::RequestContext::GetValue ( )
inline

Create a Json::JsonValue object from the current value of the buffer.

Returns
An instance of Json::JsonValue containing the contents of the buffer

Definition at line 302 of file service_credentials_provider.cpp.

static size_t Aws::Auth::RequestContext::WriteData ( char *  ptr,
size_t  ,
size_t  nmemb,
void *  userdata 
)
inlinestatic

Curl callback for CURLOPT_WRITEFUNCTION Recieves callbacks from the curl library any time data is received from a request. See https://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html for more info.

Parameters
ptrPointer to the data that was received
sizeIgnored as per documentation
nmembNumber of bytes read
userdataContext pointer, which happens to be an instance of RequestContext
Returns
Zero if an error occurs, otherwise nmemb

Definition at line 281 of file service_credentials_provider.cpp.

Member Data Documentation

Aws::StringStream Aws::Auth::RequestContext::stream_
private

Current data that has be received so far.

Definition at line 309 of file service_credentials_provider.cpp.


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


aws_common
Author(s): AWS RoboMaker
autogenerated on Sat Mar 6 2021 03:11:38