#include <icy/http/form.h>Inherits:
FormPart
Form part backed by an in-memory string payload.
| Return | Name | Description |
|---|---|---|
StringPart | Creates a StringPart with the given data and default content type "application/octet-stream". | |
StringPart | Creates a StringPart with the given data and MIME content type. | |
~StringPart virtual | Destroys the StringPart. | |
bool | writeChunk virtual | Writes the string data as a single chunk to the FormWriter. |
void | write virtual | Writes the string data to the FormWriter. |
void | write virtual | Writes the string data to an output stream. |
uint64_t | length virtual const | Returns the byte length of the string data. |
StringPart(const std::string & data)Creates a StringPart with the given data and default content type "application/octet-stream".
data String data to send as this part.StringPart(const std::string & data, const std::string & contentType)Creates a StringPart with the given data and MIME content type.
data String data to send as this part.
contentType MIME type for this part.
virtual
virtual ~StringPart()Destroys the StringPart.
virtual
virtual bool writeChunk(FormWriter & writer)Writes the string data as a single chunk to the FormWriter.
writer The FormWriter to send data through.false always (string data is sent in a single chunk).
virtual
virtual void write(FormWriter & writer)Writes the string data to the FormWriter.
writer The FormWriter to send data through.virtual
virtual void write(std::ostream & ostr)Writes the string data to an output stream.
ostr Output stream to write to.virtual const
virtual uint64_t length() constReturns the byte length of the string data.
| Return | Name | Description |
|---|---|---|
std::string | _data |
std::string _data