Open 3D Engine HttpRequestor Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
HttpRequestor::Parameters Class Reference

#include <HttpRequestParameters.h>

Public Member Functions

 Parameters (const AZStd::string &URI, Aws::Http::HttpMethod method, const Callback &callback)
 
 Parameters (const AZStd::string &URI, Aws::Http::HttpMethod method, const Headers &headers, const Callback &callback)
 
 Parameters (const AZStd::string &URI, Aws::Http::HttpMethod method, const Headers &headers, const AZStd::string &body, const Callback &callback)
 
 Parameters (const Parameters &)=default
 
Parametersoperator= (const Parameters &)=default
 
 Parameters (Parameters &&)=default
 
Parametersoperator= (Parameters &&)=default
 
const Aws::String & GetURI () const
 Get the URI in string form as an recipient of the HTTP connection.
 
Aws::Http::HttpMethod GetMethod () const
 Get the HTTP method configured to use for a request.
 
const Headers & GetHeaders () const
 
const std::shared_ptr< std::stringstream > & GetBodyStream () const
 
const Callback & GetCallback () const
 

Detailed Description

Models the parameters needed to make a HTTP call and then receive the returned JSON in a meaningful place. Examples of use are in the HttpRequestCaller class.

Constructor & Destructor Documentation

◆ Parameters() [1/3]

HttpRequestor::Parameters::Parameters ( const AZStd::string &  URI,
Aws::Http::HttpMethod  method,
const Callback &  callback 
)
inline
Parameters
URIA universal resource indicator representing an endpoint.
methodThe HTTP method to use, for example HTTP_GET.
callbackThe callback method to receive a HTTP call's response.

◆ Parameters() [2/3]

HttpRequestor::Parameters::Parameters ( const AZStd::string &  URI,
Aws::Http::HttpMethod  method,
const Headers &  headers,
const Callback &  callback 
)
inline
Parameters
URIA universal resource indicator representing an endpoint.
methodThe HTTP method to use, for example HTTP_GET.
headersA map of header names and values to use.
callbackThe callback method to receive a HTTP call's response.

◆ Parameters() [3/3]

HttpRequestor::Parameters::Parameters ( const AZStd::string &  URI,
Aws::Http::HttpMethod  method,
const Headers &  headers,
const AZStd::string &  body,
const Callback &  callback 
)
inline
Parameters
URIA universal resource indicator representing an endpoint.
methodThe HTTP method to use, for example HTTP_POST.
headersA map of header names and values to use.
bodyAn data to associate with an HTTP call.
callbackThe callback method to receive a HTTP call's response.

Member Function Documentation

◆ GetBodyStream()

const std::shared_ptr< std::stringstream > & HttpRequestor::Parameters::GetBodyStream ( ) const
inline

Get an input stream that can be used to send the body of a request.

Returns
A string stream representing a request body.

◆ GetCallback()

const Callback & HttpRequestor::Parameters::GetCallback ( ) const
inline

Get the callback function for processing JSON returned in an HTTP response. Callback functions are responsible for correctly interpreting the HTTP response code, and should communicate any failures.

Returns
The callback function to process endpoint responses with.

◆ GetHeaders()

const Headers & HttpRequestor::Parameters::GetHeaders ( ) const
inline

Get the list of extra headers to send as part of a request.

Returns
A map of header-value pairs.

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