You.i Engine
CYIOAuthRequest Class Reference

Detailed Description

This class prepares an OAuth HTTP Request over HTTP.

#include <network/YiOAuthRequest.h>

Inheritance diagram for CYIOAuthRequest:

Public Member Functions

 CYIOAuthRequest ()
 CYIOAuthRequest (const CYIServer &server)
 CYIOAuthRequest (const CYIServer &server, const CYIUrl &url, CYIHTTPRequest::Method method)
virtual ~CYIOAuthRequest ()
void AddOAuthParameter (const CYIString &keyword, const CYIString &value)
void AddOAuthSignature (const CYIString &secret)
void ClearURLParameters ()
void FinalizeOAuthParameters (const CYIString &userAccessToken, const CYIString &userAccessTokenSecret)
- Public Member Functions inherited from CYIHTTPRequest
 CYIHTTPRequest ()
 CYIHTTPRequest (const CYIUrl &url, Method method=Method::GET)
 CYIHTTPRequest (const CYIServer &server)
 CYIHTTPRequest (const CYIServer &server, const CYIUrl &url, Method method)
virtual ~CYIHTTPRequest ()
void SetMethod (Method method)
void SetServer (const CYIServer &server)
void SetPostData (const std::vector< char > &postData)
void SetPostData (CYIStringView postData)
const std::vector< char > & GetPostData () const
bool AddHeader (CYIString name, CYIString value)
std::vector< CYIHTTPHeaderGetHeaders () const
uint64_t GetUniqueID () const
void SetContextID (uint32_t contextID)
uint32_t GetContextID () const
void SetCompressionType (CompressionType compressionType)
CYIHTTPRequest::CompressionType GetCompressionType () const
Method GetMethod () const
void SetURL (const CYIUrl &url)
const CYIUrlGetURL () const
const CYIServer GetServer () const
void SetNetworkTimeoutMs (uint32_t networkTimeoutMs)
uint32_t GetNetworkTimeoutMs () const
void SetConnectionTimeoutMs (uint32_t connectionTimeoutMs)
uint32_t GetConnectionTimeoutMs () const
void SetIsConnectivityProbe (bool isConnectivityProbe)
bool IsConnectivityProbe () const
void SetUserAgent (const CYIString &userAgent)
void SetUseCookies (bool useCookies)
bool IsUsingCookies () const
const CYIHTTPHeader::CacheDirectivesGetCacheControlDirectives () const
CYIHTTPRequestPriv * GetPriv () const
void SetMetricsEnqueueTime (std::chrono::duration< uint64_t, std::micro > time)
void SetMetricsRequestTime (std::chrono::duration< uint64_t, std::micro > time)
CYIHTTPRequest::Metrics GetMetrics () const

Additional Inherited Members

- Public Types inherited from CYIHTTPRequest
enum  Method {
 Supported HTTP request methods. More...
enum  CompressionType {
 Provides a hint to the server if compression can be used on the response data. More...
- Public Attributes inherited from CYIHTTPRequest
CYISignal< std::shared_ptr< CYIHTTPRequest >, std::shared_ptr< CYIHTTPResponse >, bool > NotifyResponse
 Emitted when a response has been received for this request. The bool parameter will be true if the response is a cached response and false if the response is a server response. More...
CYISignal< std::shared_ptr< CYIHTTPRequest >, CYIHTTPService::HTTPStatusCode, CYIStringNotifyError
 Emitted when an error occured processing this request, and no response is available. Parameters included are the status code (which may be from the server or locally generated if an error occured during processing) and an error string. More...
CYISignal< std::shared_ptr< CYIHTTPRequest >, std::shared_ptr< CYIHTTPResponse >, CYIHTTPService::HTTPStatusCodeNotifyComplete
 Emitted when a success or failure response is received, or no response is available. Parameters included are request, response and status code. More...

Constructor & Destructor Documentation

◆ CYIOAuthRequest() [1/3]

CYIOAuthRequest::CYIOAuthRequest ( )

◆ CYIOAuthRequest() [2/3]

CYIOAuthRequest::CYIOAuthRequest ( const CYIServer server)

◆ CYIOAuthRequest() [3/3]

CYIOAuthRequest::CYIOAuthRequest ( const CYIServer server,
const CYIUrl url,
CYIHTTPRequest::Method  method 

◆ ~CYIOAuthRequest()

virtual CYIOAuthRequest::~CYIOAuthRequest ( )

Member Function Documentation

◆ AddOAuthParameter()

void CYIOAuthRequest::AddOAuthParameter ( const CYIString keyword,
const CYIString value 

Adds an OAuth-specific keyword/value pair to the request. This pair will be used in computing the OAuth signature.

◆ AddOAuthSignature()

void CYIOAuthRequest::AddOAuthSignature ( const CYIString secret)

Adds an OAuth-signature to the request.

The URI including the of oauth keyword/value pairs will be encoded as the signature data.

The application secret along with the optional secret will be used as the signature key.

◆ ClearURLParameters()

void CYIOAuthRequest::ClearURLParameters ( )

Clears all parameters.

◆ FinalizeOAuthParameters()

void CYIOAuthRequest::FinalizeOAuthParameters ( const CYIString userAccessToken,
const CYIString userAccessTokenSecret 

This has to be the last call after all other OAuth Parameters are specified using AddOAuthParameter(). This function will add necessary fields based on Get/Post method information and finalize the OAuth query with the signature. Token information will be retrieved from userData.

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