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>.
Loading...
Searching...
No Matches
src_network_access_qhttppart.cpp File Reference

(1dbc57ad0c7bb0ca9ffeb931c836f6f9791db12f)

Go to the source code of this file.

Functions

textPart setHeader (QNetworkRequest::ContentTypeHeader, QVariant("text/plain"))
 
textPart setHeader (QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"text\""))
 
textPart setBody ("here goes the body")
 
imagePart setHeader (QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"))
 
imagePart setHeader (QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"image\""))
 
imagePart setRawHeader ("Content-ID", "my@content.id")
 
file open (QIODevice::ReadOnly)
 
imagePart setBodyDevice (file)
 

Variables

Content Type
 [0]
 
 name
 
QHttpPart imagePart
 [1]
 
QFilefile = new QFile("image.jpg")
 

Function Documentation

◆ open()

◆ setBody()

textPart setBody ( "here goes the body" )

◆ setBodyDevice()

imagePart setBodyDevice ( file )

◆ setHeader() [1/4]

◆ setHeader() [2/4]

◆ setHeader() [3/4]

imagePart setHeader ( QNetworkRequest::ContentTypeHeader ,
QVariant("image/jpeg")  )

◆ setHeader() [4/4]

textPart setHeader ( QNetworkRequest::ContentTypeHeader ,
QVariant("text/plain")  )

◆ setRawHeader()

imagePart setRawHeader ( "Content-ID" ,
"my@content.id"  )

Variable Documentation

◆ file

QFile* file = new QFile("image.jpg")

Definition at line 23 of file src_network_access_qhttppart.cpp.

◆ imagePart

QHttpPart imagePart

[1]

[2]

Definition at line 19 of file src_network_access_qhttppart.cpp.

◆ name

Initial value:
="text"
here goes the body
The QHttpPart class holds a body part to be used inside a HTTP multipart MIME message.

Definition at line 6 of file src_network_access_qhttppart.cpp.

◆ Type

Content Type

[0]

Definition at line 5 of file src_network_access_qhttppart.cpp.