#include <HttpRequestorBus.h>
Inherits AZ::EBusTraits.
|
virtual void | AddRequest (const AZStd::string &URI, Aws::Http::HttpMethod method, const Callback &callback)=0 |
|
virtual void | AddRequestWithHeaders (const AZStd::string &URI, Aws::Http::HttpMethod method, const Headers &headers, const Callback &callback)=0 |
|
virtual void | AddRequestWithHeadersAndBody (const AZStd::string &URI, Aws::Http::HttpMethod method, const Headers &headers, const AZStd::string &body, const Callback &callback)=0 |
|
virtual void | AddTextRequest (const AZStd::string &URI, Aws::Http::HttpMethod method, const TextCallback &callback)=0 |
|
virtual void | AddTextRequestWithHeaders (const AZStd::string &URI, Aws::Http::HttpMethod method, const Headers &headers, const TextCallback &callback)=0 |
|
virtual void | AddTextRequestWithHeadersAndBody (const AZStd::string &URI, Aws::Http::HttpMethod method, const Headers &headers, const AZStd::string &body, const TextCallback &callback)=0 |
|
virtual AZStd::chrono::milliseconds | GetLastRoundTripTime () const =0 |
|
|
static const AZ::EBusHandlerPolicy | HandlerPolicy = AZ::EBusHandlerPolicy::Single |
|
static const AZ::EBusAddressPolicy | AddressPolicy = AZ::EBusAddressPolicy::Single |
|
Defines request APIs for Gem. Supports making HTTP requests. See HTTP RFC for expectations around methods, headers, and body.
◆ AddRequest()
virtual void HttpRequestor::HttpRequestorRequests::AddRequest |
( |
const AZStd::string & |
URI, |
|
|
Aws::Http::HttpMethod |
method, |
|
|
const Callback & |
callback |
|
) |
| |
|
pure virtual |
Make a RESTful call to a HTTP(s) endpoint. Receive the response, via the supplied callback as JSON.
- Parameters
-
URI | The universal resource indicator representing the endpoint to make the request to. |
method | The HTTP method to use, for example HTTP_GET. |
callback | The callback method to receive the JSON response object. |
◆ AddRequestWithHeaders()
virtual void HttpRequestor::HttpRequestorRequests::AddRequestWithHeaders |
( |
const AZStd::string & |
URI, |
|
|
Aws::Http::HttpMethod |
method, |
|
|
const Headers & |
headers, |
|
|
const Callback & |
callback |
|
) |
| |
|
pure virtual |
Make a RESTful call to a HTTP(s) endpoint with customized headers. Receive the response, via the supplied callback as JSON.
- Parameters
-
URI | The universal resource indicator representing the endpoint to make the request to. |
method | The HTTP method to use, for example HTTP_GET. |
headers | A map of header names and values to set on the request. |
callback | The callback method to receive the JSON response object. |
◆ AddRequestWithHeadersAndBody()
virtual void HttpRequestor::HttpRequestorRequests::AddRequestWithHeadersAndBody |
( |
const AZStd::string & |
URI, |
|
|
Aws::Http::HttpMethod |
method, |
|
|
const Headers & |
headers, |
|
|
const AZStd::string & |
body, |
|
|
const Callback & |
callback |
|
) |
| |
|
pure virtual |
Make a RESTful call to a HTTP(s) endpoint with customized headers and a body. Receive the response, via the supplied callback as JSON.
- Parameters
-
URI | The universal resource indicator representing the endpoint to make the request to. |
method | The HTTP method to use, for example HTTP_POST. |
headers | A map of header names and values to set on the request. |
body | Any HTTP request data to include in the request. Use Content-Type and Content-Length headers to specify the nature of the body payload. |
callback | The callback method to receive the JSON response object. |
◆ AddTextRequest()
virtual void HttpRequestor::HttpRequestorRequests::AddTextRequest |
( |
const AZStd::string & |
URI, |
|
|
Aws::Http::HttpMethod |
method, |
|
|
const TextCallback & |
callback |
|
) |
| |
|
pure virtual |
Make a RESTful call to a HTTP(s) endpoint. Receive the response, via the supplied callback as text.
- Parameters
-
URI | The universal resource indicator representing the endpoint to make the request to. |
method | The http method to use, for example HTTP_GET. |
callback | The callback method to receive the JSON response object. |
◆ AddTextRequestWithHeaders()
virtual void HttpRequestor::HttpRequestorRequests::AddTextRequestWithHeaders |
( |
const AZStd::string & |
URI, |
|
|
Aws::Http::HttpMethod |
method, |
|
|
const Headers & |
headers, |
|
|
const TextCallback & |
callback |
|
) |
| |
|
pure virtual |
Make a RESTful call to a HTTP(s) endpoint with customized headers. Receive the response, via the supplied callback as text.
- Parameters
-
URI | The universal resource indicator representing the endpoint to make the request to. |
method | The HTTP method to use, for example HTTP_GET. |
headers | A map of header names and values to set on the request. |
callback | The callback method to receive the JSON response object. |
◆ AddTextRequestWithHeadersAndBody()
virtual void HttpRequestor::HttpRequestorRequests::AddTextRequestWithHeadersAndBody |
( |
const AZStd::string & |
URI, |
|
|
Aws::Http::HttpMethod |
method, |
|
|
const Headers & |
headers, |
|
|
const AZStd::string & |
body, |
|
|
const TextCallback & |
callback |
|
) |
| |
|
pure virtual |
Make a RESTful call to a HTTP(s) endpoint with customized headers and a body. Receive the response, via the supplied callback as text.
- Parameters
-
URI | The universal resource indicator representing the endpoint to make the request to. |
method | The HTTP method to use, for example HTTP_POST. |
headers | A map of header names and values to set on the request. |
body | Any HTTP request data to include in the request. Use Content-Type and Content-Length headers to specify the nature of the body payload. |
callback | The callback method to receive the JSON response object. |
◆ GetLastRoundTripTime()
virtual AZStd::chrono::milliseconds HttpRequestor::HttpRequestorRequests::GetLastRoundTripTime |
( |
| ) |
const |
|
pure virtual |
Receive the round trip time of the last RESTful call made to a HTTP(s) endpoint. Call this method from inside the supplied callback to get the round trip time of the original request.
- Returns
- The round trip time in milliseconds.
The documentation for this class was generated from the following file:
- Gems/HttpRequestor/Code/Include/HttpRequestor/HttpRequestorBus.h