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

#include <NET_WebResponse.h>

+ Inheritance diagram for NET_BaseWebResponse:

Public Types

using HeaderMap = UT_ArrayStringMap< UT_StringHolder >
 

Public Member Functions

 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
 
UT_Optional< const
UT_StringHolder & > 
getHeaderContentType ()
 
const UT_StringHoldercontentTypeOrEmpty () const
 
UT_Optional< exintgetHeaderContentLength ()
 
bool hasContentType (const UT_StringRef &mime) const
 
NET_Time modTime () const
 
bool hasJSONBody () const
 

Static Public Member Functions

static void stockMsgFromCode (NET_HTTPStatusCode code, UT_WorkBuffer &msg)
 
static bool isJSONBody (const HeaderMap &headers)
 

Public Attributes

NET_HTTPStatusCode myStatus
 
HeaderMap myHeaders
 
UT_StringArray myCookies
 
UT_StringHolder myData
 

Detailed Description

Holds all common information between a client response and an object holding the servers response to a client.

Definition at line 94 of file NET_WebResponse.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Member Function Documentation

const UT_StringHolder& NET_BaseWebResponse::contentTypeOrEmpty ( ) const
inline

Definition at line 121 of file NET_WebResponse.h.

UT_Optional<exint> NET_BaseWebResponse::getHeaderContentLength ( )
UT_Optional<const UT_StringHolder &> NET_BaseWebResponse::getHeaderContentType ( )
bool NET_BaseWebResponse::hasContentType ( const UT_StringRef mime) const
bool NET_BaseWebResponse::hasHeader ( const UT_StringRef header) const
bool NET_BaseWebResponse::hasJSONBody ( ) const
bool NET_BaseWebResponse::hasTimedout ( ) const
inline

Definition at line 113 of file NET_WebResponse.h.

UT_StringHolder NET_BaseWebResponse::headersAsString ( ) const
bool NET_BaseWebResponse::isBadRequest ( ) const
inline

Definition at line 112 of file NET_WebResponse.h.

static bool NET_BaseWebResponse::isJSONBody ( const HeaderMap headers)
static
bool NET_BaseWebResponse::isRequestNotFound ( ) const
inline

Definition at line 111 of file NET_WebResponse.h.

bool NET_BaseWebResponse::isSuccess ( ) const
inline

Definition at line 109 of file NET_WebResponse.h.

NET_Time NET_BaseWebResponse::modTime ( ) const
NET_BaseWebResponse::operator bool ( ) const
inlineexplicit

Definition at line 107 of file NET_WebResponse.h.

static void NET_BaseWebResponse::stockMsgFromCode ( NET_HTTPStatusCode  code,
UT_WorkBuffer msg 
)
static

Member Data Documentation

UT_StringArray NET_BaseWebResponse::myCookies

Definition at line 144 of file NET_WebResponse.h.

UT_StringHolder NET_BaseWebResponse::myData

Definition at line 146 of file NET_WebResponse.h.

HeaderMap NET_BaseWebResponse::myHeaders

Definition at line 143 of file NET_WebResponse.h.

NET_HTTPStatusCode NET_BaseWebResponse::myStatus

Definition at line 141 of file NET_WebResponse.h.


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