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...
 
UT_JSONValueMapjson ()
 
Type type () const
 
UT_StringHolder idToString () const
 
const hboost::uuids::uuid & id () 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 28 of file NET_WebAPIResponse.h.

Member Enumeration Documentation

Enumerator
HTTP 
WebSocket 

Definition at line 31 of file NET_WebAPIResponse.h.

Constructor & Destructor Documentation

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

Member Function Documentation

const hboost::uuids::uuid& NET_WebAPIResponse::id ( ) const
inline

Definition at line 61 of file NET_WebAPIResponse.h.

UT_StringHolder NET_WebAPIResponse::idToString ( ) const
inline

Definition at line 57 of file NET_WebAPIResponse.h.

UT_JSONValueMap* NET_WebAPIResponse::json ( )
inline

Definition at line 55 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 56 of file NET_WebAPIResponse.h.

Member Data Documentation

UT_StringArray NET_WebAPIResponse::myCookies

Definition at line 50 of file NET_WebAPIResponse.h.

UT_StringHolder NET_WebAPIResponse::myData

Definition at line 53 of file NET_WebAPIResponse.h.

NET_HTTPResponse::Error NET_WebAPIResponse::myError

Definition at line 51 of file NET_WebAPIResponse.h.

NET_HTTPResponse::HeaderMap NET_WebAPIResponse::myHeaders

Definition at line 49 of file NET_WebAPIResponse.h.

NET_HTTPStatusCode NET_WebAPIResponse::myStatus

Definition at line 48 of file NET_WebAPIResponse.h.


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