HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_WebAPIResponse Class Reference

#include <NET_WebAPIResponse.h>

Public Types

enum  Type { HTTP, WebSocket }
 

Public Member Functions

 NET_WebAPIResponse ()=default
 
 NET_WebAPIResponse (NET_HTTPResponse &&resp)
 
void setAsHTTP (NET_HTTPResponse &&resp)
 
bool parseWebSocket (const UT_StringHolder &resp)
 Parse a websocket response. More...
 
const UT_JSONValuejson ()
 
Type type () const
 
UT_StringHolder idToString () const
 
const UT_SGuidid () const
 

Public Attributes

NET_HTTPStatusCode myStatus
 
NET_HTTPResponse::HeaderMap myHeaders
 
UT_StringArray myCookies
 
NET_HTTPResponse::Error myError
 
UT_StringHolder myData
 

Detailed Description

Definition at line 24 of file NET_WebAPIResponse.h.

Member Enumeration Documentation

Enumerator
HTTP 
WebSocket 

Definition at line 27 of file NET_WebAPIResponse.h.

Constructor & Destructor Documentation

NET_WebAPIResponse::NET_WebAPIResponse ( )
default
NET_WebAPIResponse::NET_WebAPIResponse ( NET_HTTPResponse &&  resp)

Member Function Documentation

const UT_SGuid& NET_WebAPIResponse::id ( ) const
inline

Definition at line 57 of file NET_WebAPIResponse.h.

UT_StringHolder NET_WebAPIResponse::idToString ( ) const
inline

Definition at line 53 of file NET_WebAPIResponse.h.

const UT_JSONValue* NET_WebAPIResponse::json ( )
inline

Definition at line 51 of file NET_WebAPIResponse.h.

bool NET_WebAPIResponse::parseWebSocket ( const UT_StringHolder resp)

Parse a websocket response.

Parameters
respThe response from a websocket api request.
Returns
True if the parse was a success.
void NET_WebAPIResponse::setAsHTTP ( NET_HTTPResponse &&  resp)
Type NET_WebAPIResponse::type ( ) const
inline

Definition at line 52 of file NET_WebAPIResponse.h.

Member Data Documentation

UT_StringArray NET_WebAPIResponse::myCookies

Definition at line 46 of file NET_WebAPIResponse.h.

UT_StringHolder NET_WebAPIResponse::myData

Definition at line 49 of file NET_WebAPIResponse.h.

NET_HTTPResponse::Error NET_WebAPIResponse::myError

Definition at line 47 of file NET_WebAPIResponse.h.

NET_HTTPResponse::HeaderMap NET_WebAPIResponse::myHeaders

Definition at line 45 of file NET_WebAPIResponse.h.

NET_HTTPStatusCode NET_WebAPIResponse::myStatus

Definition at line 44 of file NET_WebAPIResponse.h.


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