Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
The QFormDataBuilder class is a convenience class to simplify the construction of QHttpMultiPart objects. More...
#include <qformdatabuilder.h>
Public Member Functions | |
Q_NETWORK_EXPORT | QFormDataBuilder () |
Constructs an empty QFormDataBuilder object. | |
QFormDataBuilder (QFormDataBuilder &&other) noexcept | |
Move-constructs a QFormDataBuilder instance, making it point at the same object that other was pointing to. | |
void | swap (QFormDataBuilder &other) noexcept |
Q_NETWORK_EXPORT | ~QFormDataBuilder () |
Destroys the QFormDataBuilder object. | |
Q_NETWORK_EXPORT QFormDataPartBuilder & | part (QAnyStringView name) |
Constructs and returns a reference to a QFormDataPartBuilder object and sets name as the name parameter of the form-data. | |
Q_NETWORK_EXPORT std::unique_ptr< QHttpMultiPart > | buildMultiPart () |
Constructs and returns a pointer to a QHttpMultipart object. | |
The QFormDataBuilder class is a convenience class to simplify the construction of QHttpMultiPart objects.
\inmodule QtNetwork
The QFormDataBuilder class can be used to build a QHttpMultiPart object with the content type set to be FormDataType by default.
The snippet below demonstrates how to build a multipart message with QFormDataBuilder:
Definition at line 90 of file qformdatabuilder.h.
QFormDataBuilder::QFormDataBuilder | ( | ) |
Constructs an empty QFormDataBuilder object.
Definition at line 302 of file qformdatabuilder.cpp.
|
inlinenoexcept |
Move-constructs a QFormDataBuilder instance, making it point at the same object that other was pointing to.
Definition at line 95 of file qformdatabuilder.h.
QFormDataBuilder::~QFormDataBuilder | ( | ) |
Destroys the QFormDataBuilder object.
Definition at line 312 of file qformdatabuilder.cpp.
std::unique_ptr< QHttpMultiPart > QFormDataBuilder::buildMultiPart | ( | ) |
Constructs and returns a pointer to a QHttpMultipart object.
Definition at line 355 of file qformdatabuilder.cpp.
References QHttpMultiPart::append(), d, QHttpMultiPart::FormDataType, multiPart, and part().
QFormDataPartBuilder & QFormDataBuilder::part | ( | QAnyStringView | name | ) |
Constructs and returns a reference to a QFormDataPartBuilder object and sets name as the name parameter of the form-data.
The returned reference is valid until the next call to this function.
Limiting name characters to US-ASCII is \l {https://datatracker.ietf.org/doc/html/rfc7578#section-5.1.1}{strongly recommended} for interoperability reasons.
Definition at line 342 of file qformdatabuilder.cpp.
References d.
Referenced by buildMultiPart().
|
inlinenoexcept |
Definition at line 98 of file qformdatabuilder.h.
References other(), and qt_ptr_swap().