QFormDataBuilder Class

The QFormDataBuilder class is a convenience class to simplify the construction of QHttpMultiPart objects. More...

Header: #include <QFormDataBuilder>
CMake: find_package(Qt6 REQUIRED COMPONENTS Network)
target_link_libraries(mytarget PRIVATE Qt6::Network)
qmake: QT += network
Since: Qt 6.8

Public Functions

QFormDataBuilder()
QFormDataBuilder(QFormDataBuilder &&other)
~QFormDataBuilder()
std::unique_ptr<QHttpMultiPart> buildMultiPart()
QFormDataPartBuilder &part(QLatin1StringView name)
QFormDataBuilder &operator=(QFormDataBuilder &&other)

Detailed Description

The QFormDataBuilder class can be used to build a QHttpMultiPart object with the content type set to be FormDataType by default.

See also QHttpPart, QHttpMultiPart, and QFormDataPartBuilder.

Member Function Documentation

[explicit] QFormDataBuilder::QFormDataBuilder()

Constructs an empty QFormDataBuilder object.

[noexcept] QFormDataBuilder::QFormDataBuilder(QFormDataBuilder &&other)

Move-constructs a QFormDataBuilder instance, making it point at the same object that other was pointing to.

[noexcept] QFormDataBuilder::~QFormDataBuilder()

Destroys the QFormDataBuilder object.

std::unique_ptr<QHttpMultiPart> QFormDataBuilder::buildMultiPart()

Constructs and returns a pointer to a QHttpMultipart object. The caller takes ownership of the generated QHttpMultiPart object.

See also QHttpMultiPart.

QFormDataPartBuilder &QFormDataBuilder::part(QLatin1StringView 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.

See also QFormDataPartBuilder and QHttpPart.

[noexcept] QFormDataBuilder &QFormDataBuilder::operator=(QFormDataBuilder &&other)

Move-assigns other to this QFormDataBuilder instance.