Crashpad
|
This class is used to build a MIME multipart message, conforming to RFC 2046, for use as a HTTP request body. More...
#include "util/net/http_multipart_builder.h"
Public Member Functions | |
void | SetFormData (const std::string &key, const std::string &value) |
Sets a Content-Disposition: form-data key-value pair. More... | |
void | SetFileAttachment (const std::string &key, const std::string &upload_file_name, const base::FilePath &path, const std::string &content_type) |
Specifies the file at path to have its contents uploaded as multipart data, available at name of upload_file_name. More... | |
std::unique_ptr< HTTPBodyStream > | GetBodyStream () |
Generates the HTTPBodyStream for the data currently supplied to the builder. More... | |
HTTPHeaders::value_type | GetContentType () const |
Gets the header pair for "Content-Type" . | |
This class is used to build a MIME multipart message, conforming to RFC 2046, for use as a HTTP request body.
std::unique_ptr< HTTPBodyStream > crashpad::HTTPMultipartBuilder::GetBodyStream | ( | ) |
Generates the HTTPBodyStream for the data currently supplied to the builder.
void crashpad::HTTPMultipartBuilder::SetFileAttachment | ( | const std::string & | key, |
const std::string & | upload_file_name, | ||
const base::FilePath & | path, | ||
const std::string & | content_type | ||
) |
Specifies the file at path to have its contents uploaded as multipart data, available at name
of upload_file_name.
[in] | key | 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. |
[in] | upload_file_name | The filename to specify for this multipart data attachment. |
[in] | path | The path of the file whose contents will be uploaded. |
[in] | content_type | The Content-Type to specify for the attachment. If this is empty, "application/octet-stream" will be used. |
void crashpad::HTTPMultipartBuilder::SetFormData | ( | const std::string & | key, |
const std::string & | value | ||
) |
Sets a Content-Disposition: form-data
key-value pair.
[in] | key | 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. |
[in] | value | The value to set at the key. |