class HTTPMultipartBuilder

Defined at line 31 of file ../../third_party/crashpad/src/util/net/http_multipart_builder.h

This class is used to build a MIME multipart message, conforming to

RFC 2046, for use as a HTTP request body.

Public Methods

void HTTPMultipartBuilder ()
void HTTPMultipartBuilder (const HTTPMultipartBuilder & )

Defined at line 35 of file ../../third_party/crashpad/src/util/net/http_multipart_builder.h

HTTPMultipartBuilder & operator= (const HTTPMultipartBuilder & )

Defined at line 36 of file ../../third_party/crashpad/src/util/net/http_multipart_builder.h

void ~HTTPMultipartBuilder ()
void SetGzipEnabled (bool gzip_enabled)

Enables or disables `gzip` compression.

When `gzip` compression is enabled, the body stream returned by

GetBodyStream() will be `gzip`-compressed, and the content headers set by

PopulateContentHeaders() will contain `Content-Encoding: gzip`.

Parameters

gzip_enabled [in] Whether to enable or disable `gzip` compression.
void SetFormData (const std::string & key, const std::string & value)

Sets a `Content-Disposition: form-data` key-value pair.

Parameters

key [in] The key of the form data, specified as the `name` in the multipart message. Any data previously set on this class with this key will be overwritten.
value [in] The value to set at the
void SetFileAttachment (const std::string & key, const std::string & upload_file_name, FileReaderInterface * reader, const std::string & content_type)

Specifies the contents read from

to be uploaded as

multipart data, available at `name` of

Parameters

key [in] The key of the form data, specified as the `name` in the multipart message. Any data previously set on this class with this key will be overwritten.
upload_file_name [in] The `filename` to specify for this multipart data attachment.
reader [in] A FileReaderInterface from which to read the content to upload.
content_type [in] The `Content-Type` to specify for the attachment. If this is empty, `"application/octet-stream"` will be used.
std::unique_ptr<HTTPBodyStream> GetBodyStream ()

Generates the HTTPBodyStream for the data currently supplied to

the builder.

Returns

A caller-owned HTTPBodyStream object.

void PopulateContentHeaders (HTTPHeaders * http_headers)

Adds the appropriate content headers to

Any headers that this method adds will replace existing headers by the

same name in