40 Body(
const char *data,
int size = -1,
const QByteArray &contentType = QByteArray());
41 Body(
const QByteArray &data,
const QByteArray &contentType = QByteArray());
42 Body(
const QString &text,
const QByteArray &contentType = QByteArray());
43 Body(
const QJsonObject &
object);
44 Body(
const QJsonArray &array);
45 Body(
const QJsonDocument &doc);
48 Body(QIODevice *device,
const QByteArray &contentType = QByteArray());
49 Body(QIODevice *device, qint64 size,
const QByteArray &contentType = QByteArray());
50 Body(QHttpMultiPart *multiPart);
58 bool hasPlainText()
const;
59 QByteArray toByteArray()
const;
60 QString toString()
const;
62 bool hasJsonObject()
const;
63 QJsonObject jsonObject()
const;
65 bool hasJsonArray()
const;
66 QJsonArray jsonArray()
const;
68 bool isDevice()
const;
69 QIODevice *device()
const;
71 bool isMultiPart()
const;
72 QHttpMultiPart *multiPart()
const;
74 QVariant object()
const;
75 Type objectType()
const;
77 QString contentType()
const;
78 qint64 contentLength()
const;
83 Body(
const QVariant &
object,
Type type,
const QByteArray &contentType, qint64 contentLength);
85 QExplicitlySharedDataPointer<BodyData> d_ptr;
87 static QMimeDatabase s_mimeDatabase;
Represents the body of an HTTP request.
Definition body.h:27
Type
Describes the type of content contained in the request body.
Definition body.h:29