QtBase  v6.3.1
Functions | Variables
src_network_access_qhttppart.cpp File Reference

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] More...
 
 name
 
QHttpPart imagePart
 [1] More...
 
QFilefile = new QFile("image.jpg")
 

Function Documentation

◆ open()

◆ setBody()

textPart setBody ( "here goes the body"  )

◆ setBodyDevice()

imagePart setBodyDevice ( file  )

◆ setHeader() [1/4]

imagePart setHeader ( QNetworkRequest::ContentDispositionHeader  ,
QVariant("form-data; name=\"image\"")   
)

◆ setHeader() [2/4]

textPart setHeader ( QNetworkRequest::ContentDispositionHeader  ,
QVariant("form-data; name=\"text\"")   
)

◆ 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 59 of file src_network_access_qhttppart.cpp.

◆ imagePart

QHttpPart imagePart

[1]

[2]

Definition at line 55 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.
QPainterPath body()
Definition: paths.cpp:95

Definition at line 42 of file src_network_access_qhttppart.cpp.

◆ Type

Content Type

[0]

Definition at line 41 of file src_network_access_qhttppart.cpp.