![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cHttpClient.h>
Public Member Functions | |
cHttpPart (MIME_TYPE eContentType=MIME_TEXT, cStringA sContentDisposition="") | |
virtual | ~cHttpPart () |
size_t | get_PartLength () const |
HRESULT | WritePart (cStreamOutput *pClient, const char *pszBoundary, IStreamProgressCallback *pProgress=nullptr) |
Static Public Member Functions | |
static void GRAYCALL | CreateBoundary (OUT char *pszBoundary) |
static StrLen_t GRAYCALL | GetBoundarySize () |
static HRESULT GRAYCALL | WriteBoundary (cStreamOutput *pClient, const char *pszBoundary) |
Public Attributes | |
MIME_TYPE | m_eContentType |
HTTP_TAG_ContentType="text/plain" = MIME_TEXT. More... | |
cStringA | m_sContentDisposition |
HTTP_TAG_ContentDisposition = "form-data; name="mdump"; filename="sdfsdf.txt"". More... | |
Static Public Attributes | |
static const StrLen_t | k_nLenBoundaryPrefix = 2 |
– More... | |
static const StrLen_t | k_nLenBoundary = (8 + 16) |
Multi part length of Boundary separator. More... | |
Protected Member Functions | |
virtual size_t | get_BodyLength () const =0 |
virtual HRESULT | WriteBody (cStreamOutput *pClient, IStreamProgressCallback *pProgress=nullptr)=0 |
A single part of multi-part form data client is sending to the server.
|
inline |
|
inlinevirtual |
|
static |
Create a random multi-part form boundary string. k_nLenBoundary length. ASSUME This pattern will not occur in my data set.
|
protectedpure virtual |
Implemented in GrayLib::cHttpPartFile, and GrayLib::cHttpPartStr.
size_t GrayLib::cHttpPart::get_PartLength | ( | ) | const |
get length of WritePart()
|
protectedpure virtual |
Implemented in GrayLib::cHttpPartFile, and GrayLib::cHttpPartStr.
|
static |
Write a multi-part form boundary string. GetBoundarySize()
HRESULT GrayLib::cHttpPart::WritePart | ( | cStreamOutput * | pClient, |
const char * | pszBoundary, | ||
IStreamProgressCallback * | pProgress = nullptr |
||
) |
Write get_PartLength() We assume pszBoundary doesn't exist in the stream!!!
|
static |
Multi part length of Boundary separator.
|
static |
–
MIME_TYPE GrayLib::cHttpPart::m_eContentType |
HTTP_TAG_ContentType="text/plain" = MIME_TEXT.
cStringA GrayLib::cHttpPart::m_sContentDisposition |
HTTP_TAG_ContentDisposition = "form-data; name="mdump"; filename="sdfsdf.txt"".