|
CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
|
One named entry of an HTTP POST body (form field or uploaded file part). More...
#include <NetworkProtocols.h>
Public Member Functions | |
| HTTPPostEntry () | |
| virtual | ~HTTPPostEntry () |
| bool | isValid () |
| bool | setContent (const char *content, uint32 size) |
| Copy content bytes into this entry (NUL-terminated internally). | |
Public Attributes | |
| std::string | name |
| Form field name (Content-Disposition name attribute). | |
| std::string | filename |
| Original filename for file uploads (empty for plain fields). | |
| std::string | type |
| MIME Content-Type of this part. | |
| uint32 | contentSize |
| Size of ::content in bytes. | |
| char * | content |
| Owned content bytes (NUL-terminated for convenience). | |
One named entry of an HTTP POST body (form field or uploaded file part).
Used both when parsing multipart/form-data requests (each part becomes an entry in HTTPRequest::postEntries) and when building multipart requests (HTTPRequest::createMultipartRequest()). Owns its content buffer.
Definition at line 134 of file NetworkProtocols.h.
|
inline |
Definition at line 136 of file NetworkProtocols.h.
References content, and contentSize.
|
inlinevirtual |
Definition at line 137 of file NetworkProtocols.h.
References content.
|
inline |
Definition at line 140 of file NetworkProtocols.h.
References content, contentSize, and name.
Referenced by cmlabs::HTTPRequest::parseContentChunk().
|
inline |
Copy content bytes into this entry (NUL-terminated internally).
| content | Source bytes (copied; caller retains ownership). |
| size | Byte count. |
content is NULL. Definition at line 146 of file NetworkProtocols.h.
References content, and contentSize.
Referenced by cmlabs::HTTPRequest::parseContentChunk(), and cmlabs::HTTPRequest::parseContentParameters().
| char* cmlabs::HTTPPostEntry::content |
Owned content bytes (NUL-terminated for convenience).
Definition at line 159 of file NetworkProtocols.h.
Referenced by cmlabs::HTTPRequest::createRequest(), cmlabs::RESTHTTPCall::generateHTTPRequest(), HTTPPostEntry(), isValid(), setContent(), and ~HTTPPostEntry().
| uint32 cmlabs::HTTPPostEntry::contentSize |
Size of ::content in bytes.
Definition at line 158 of file NetworkProtocols.h.
Referenced by cmlabs::HTTPRequest::createRequest(), cmlabs::RESTHTTPCall::generateHTTPRequest(), HTTPPostEntry(), isValid(), and setContent().
| std::string cmlabs::HTTPPostEntry::filename |
Original filename for file uploads (empty for plain fields).
Definition at line 156 of file NetworkProtocols.h.
Referenced by cmlabs::HTTPRequest::parseContentChunk().
| std::string cmlabs::HTTPPostEntry::name |
Form field name (Content-Disposition name attribute).
Definition at line 155 of file NetworkProtocols.h.
Referenced by cmlabs::RESTHTTPCall::generateHTTPRequest(), isValid(), cmlabs::HTTPRequest::parseContentChunk(), and cmlabs::HTTPRequest::parseContentParameters().
| std::string cmlabs::HTTPPostEntry::type |
MIME Content-Type of this part.
Definition at line 157 of file NetworkProtocols.h.
Referenced by cmlabs::HTTPRequest::createRequest(), cmlabs::RESTHTTPCall::generateHTTPRequest(), cmlabs::HTTPRequest::parseContentChunk(), and cmlabs::HTTPRequest::parseContentParameters().