HDK
|
#include <NET_WebResponse.h>
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_StringHolder & | getHeaderOrEmpty (const UT_StringRef &header) const |
UT_Optional< UT_StringHolder > | getHeaderContentType () |
const UT_StringHolder & | contentTypeOrEmpty () const |
UT_Optional< exint > | getHeaderContentLength () |
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 |
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.
Definition at line 102 of file NET_WebResponse.h.
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 | ||
) |
|
inline |
Definition at line 135 of file NET_WebResponse.h.
UT_Optional<exint> NET_BaseWebResponse::getHeaderContentLength | ( | ) |
UT_Optional<UT_StringHolder> NET_BaseWebResponse::getHeaderContentType | ( | ) |
|
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 |
|
inline |
Definition at line 118 of file NET_WebResponse.h.
UT_StringHolder NET_BaseWebResponse::headersAsString | ( | ) | const |
|
inline |
Definition at line 117 of file NET_WebResponse.h.
|
static |
|
inline |
Definition at line 116 of file NET_WebResponse.h.
|
inline |
Definition at line 114 of file NET_WebResponse.h.
NET_Time NET_BaseWebResponse::modTime | ( | ) | const |
|
inlineexplicit |
Definition at line 112 of file NET_WebResponse.h.
void NET_BaseWebResponse::setDefault | ( | const UT_StringHolder & | name, |
const UT_StringHolder & | value | ||
) |
|
static |
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.