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
 
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
 

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 99 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 135 of file NET_WebResponse.h.

UT_Optional<exint> NET_BaseWebResponse::getHeaderContentLength ( )
UT_Optional<UT_StringHolder> NET_BaseWebResponse::getHeaderContentType ( )
const UT_StringHolder& NET_BaseWebResponse::getHeaderOrEmpty ( const UT_StringRef header) const
inline

Definition at line 127 of file NET_WebResponse.h.

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 118 of file NET_WebResponse.h.

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

Definition at line 117 of file NET_WebResponse.h.

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

Definition at line 116 of file NET_WebResponse.h.

bool NET_BaseWebResponse::isSuccess ( ) const
inline

Definition at line 114 of file NET_WebResponse.h.

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

Definition at line 112 of file NET_WebResponse.h.

void NET_BaseWebResponse::setDefault ( const UT_StringHolder name,
const UT_StringHolder value 
)
static void NET_BaseWebResponse::stockMsgFromCode ( NET_HTTPStatusCode  code,
UT_WorkBuffer msg 
)
static

Member Data Documentation

UT_StringArray NET_BaseWebResponse::myCookies

Definition at line 158 of file NET_WebResponse.h.

UT_StringHolder NET_BaseWebResponse::myData

Definition at line 160 of file NET_WebResponse.h.

HeaderMap NET_BaseWebResponse::myHeaders

Definition at line 157 of file NET_WebResponse.h.

NET_HTTPStatusCode NET_BaseWebResponse::myStatus

Definition at line 155 of file NET_WebResponse.h.


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