HttpContent¶
Description¶
The HttpContent object represents the content of a HTTP request or response which is sent to or received from a HTTP server.
› Inherits: | Object |
---|
Properties¶
data¶
This property holds the actual data to send or which has been received. The data type depends on the format specified through the type property. See the HttpContent.Type enumeration for details.
› Type: | Variant |
---|---|
› Signal: | dataChanged() |
› Attributes: | Writable |
type¶
This property holds the type specifying in which format to send or receive data.
› Type: | Type |
---|---|
› Default: | HttpContent.PlainText |
› Signal: | typeChanged() |
› Attributes: | Writable |
Enumerations¶
Type¶
This enumeration describes the type specifying in which format to send or receive data.
Name | Value | Description |
---|---|---|
HttpContent.PlainText |
0 |
Send and receive data as plaintext. |
HttpContent.Binary |
1 |
Send and receive data as raw bytes which can be accessed as an ArrayBuffer . |
HttpContent.Json |
2 |
Send and receive data as JSON objects. |
Example¶
See HttpHeader example on how to use HttpContent.