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

Response object used by a client from a response by a server. More...

#include <NET_WebResponse.h>

+ Inheritance diagram for NET_HTTPResponse:

Classes

struct  Error
 

Public Member Functions

 NET_HTTPResponse ()
 
 NET_HTTPResponse (NET_HTTPStatusCode code)
 
 NET_HTTPResponse (NET_HTTPStatusCode code, const UT_StringHolder &data)
 
 NET_HTTPResponse (NET_HTTPStatusCode code, const HeaderMap &headers, const UT_StringHolder &data)
 
 NET_HTTPResponse (NET_HTTPStatusCode code, const HeaderMap &headers)
 
void parseCookies (UT_Array< NET_NetworkCookie > &cookies) const
 
bool errorReceivedNothing () const
 
void clear ()
 
- Public Member Functions inherited from NET_BaseWebResponse
 NET_BaseWebResponse ()
 
 NET_BaseWebResponse (NET_HTTPStatusCode code)
 
 NET_BaseWebResponse (NET_HTTPStatusCode code, const UT_StringHolder &data)
 
 NET_BaseWebResponse (NET_HTTPStatusCode code, const HeaderMap &headers, const UT_StringHolder &data)
 
 NET_BaseWebResponse (NET_HTTPStatusCode code, const HeaderMap &headers)
 
 operator bool () const
 
bool isSuccess () const
 
bool isRequestNotFound () const
 
bool isBadRequest () const
 
bool hasTimedout () const
 
UT_StringHolder headersAsString () const
 
bool hasHeader (const UT_StringRef &header) const
 
void setDefault (const UT_StringHolder &name, const UT_StringHolder &value)
 
const UT_StringHoldergetHeaderOrEmpty (const UT_StringRef &header) const
 
UT_Optional< UT_StringHoldergetHeaderContentType ()
 
const UT_StringHoldercontentTypeOrEmpty () const
 
UT_Optional< exintgetHeaderContentLength ()
 
bool hasContentType (const UT_StringRef &mime) const
 
NET_Time modTime () const
 
bool hasJSONBody () const
 

Public Attributes

Error myError
 
fpreal64 myConnectTime = 0.0f
 
fpreal64 myTotalTime = 0.0f
 
- Public Attributes inherited from NET_BaseWebResponse
NET_HTTPStatusCode myStatus
 
HeaderMap myHeaders
 
UT_StringArray myCookies
 
UT_StringHolder myData
 

Additional Inherited Members

- Public Types inherited from NET_BaseWebResponse
using HeaderMap = UT_ArrayStringMap< UT_StringHolder >
 
- Static Public Member Functions inherited from NET_BaseWebResponse
static void stockMsgFromCode (NET_HTTPStatusCode code, UT_WorkBuffer &msg)
 
static bool isJSONBody (const HeaderMap &headers)
 

Detailed Description

Response object used by a client from a response by a server.

Definition at line 278 of file NET_WebResponse.h.

Constructor & Destructor Documentation

NET_HTTPResponse::NET_HTTPResponse ( )
NET_HTTPResponse::NET_HTTPResponse ( NET_HTTPStatusCode  code)
NET_HTTPResponse::NET_HTTPResponse ( NET_HTTPStatusCode  code,
const UT_StringHolder data 
)
NET_HTTPResponse::NET_HTTPResponse ( NET_HTTPStatusCode  code,
const HeaderMap headers,
const UT_StringHolder data 
)
NET_HTTPResponse::NET_HTTPResponse ( NET_HTTPStatusCode  code,
const HeaderMap headers 
)

Member Function Documentation

void NET_HTTPResponse::clear ( )
bool NET_HTTPResponse::errorReceivedNothing ( ) const
inline

Definition at line 301 of file NET_WebResponse.h.

void NET_HTTPResponse::parseCookies ( UT_Array< NET_NetworkCookie > &  cookies) const

Member Data Documentation

fpreal64 NET_HTTPResponse::myConnectTime = 0.0f

Definition at line 310 of file NET_WebResponse.h.

Error NET_HTTPResponse::myError

Definition at line 308 of file NET_WebResponse.h.

fpreal64 NET_HTTPResponse::myTotalTime = 0.0f

Definition at line 311 of file NET_WebResponse.h.


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