InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDHTTPRequest Class Reference

Public Types

typedef std::function< void(IDHTTPRequest
&request,
uxtech::network::HttpResult
result)> 
AsyncIDHttpRequestNotifier
 

Public Member Functions

virtual void SetUrl (const std::string url)
 
virtual void SetMethod (const std::string method)
 
virtual std::string GetUrl ()
 
virtual std::string GetMethod ()
 
virtual void ExecuteAsync (const AsyncIDHttpRequestNotifier &notifier, const uxtech::thread::QueuePtr &threadqueue)
 
virtual uxtech::network::HttpResult ExecuteSync ()
 

Static Public Member Functions

static void CleanupOnShutdown ()
 

Member Function Documentation

virtual void IDHTTPRequest::ExecuteAsync (const AsyncIDHttpRequestNotifier & notifier,
const uxtech::thread::QueuePtr & threadqueue 
)
virtual

Execute the HTTP request in an asynchronous manner once it has been set up. This function returns immediately. Care must be taken so that IDHTTPREquest is not destroyed by the time the http request actually completes.

Parameters
notifier[IN] A reference to the callback function that will be called on request completion.
threadqueue[IN] A reference to the queue object in which this asynchronous task will be scheduled.
virtual uxtech::network::HttpResult IDHTTPRequest::ExecuteSync ()
virtual

Execute the HTTP request in an asynchronous manner once it has been set up. Returns the corresponding response code, i.e. 200 OK or 404 NOT FOUND etc. For asynchronous implementation use ExecuteAsync.

virtual std::string IDHTTPRequest::GetMethod ()
inlinevirtual

Gets the Method(GET,POST,etc) for HTTP calls

Returns
method for HTTP call
virtual std::string IDHTTPRequest::GetUrl ()
inlinevirtual

Gets the url for HTTP call

Returns
url for HTTP call
virtual void IDHTTPRequest::SetMethod (const std::string method)
inlinevirtual

Sets the Method(GET,POST,etc) for HTTP call

Parameters
method[IN] method for HTTP call
virtual void IDHTTPRequest::SetUrl (const std::string url)
inlinevirtual

Sets the Url for HTTP call

Parameters
url[IN] url for HTTP call