.. _object_HttpContent: :index:`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**: :ref:`Object ` Overview ******** Properties ++++++++++ .. hlist:: :columns: 1 * :ref:`data ` * :ref:`type ` * :ref:`Object.objectId ` * :ref:`Object.parent ` Methods +++++++ .. hlist:: :columns: 1 * :ref:`Object.deserializeProperties() ` * :ref:`Object.fromJson() ` * :ref:`Object.serializeProperties() ` * :ref:`Object.toJson() ` Signals +++++++ .. hlist:: :columns: 1 * :ref:`Object.completed() ` Enumerations ++++++++++++ .. hlist:: :columns: 1 * :ref:`Type ` Properties ********** .. _property_HttpContent_data: .. _signal_HttpContent_dataChanged: .. index:: single: data data ++++ This property holds the actual data to send or which has been received. The data type depends on the format specified through the :ref:`type ` property. See the :ref:`HttpContent.Type ` enumeration for details. :**› Type**: Variant :**› Signal**: dataChanged() :**› Attributes**: Writable .. _property_HttpContent_type: .. _signal_HttpContent_typeChanged: .. index:: single: type type ++++ This property holds the type specifying in which format to send or receive data. :**› Type**: :ref:`Type ` :**› Default**: :ref:`HttpContent.PlainText ` :**› Signal**: typeChanged() :**› Attributes**: Writable Enumerations ************ .. _enum_HttpContent_Type: .. index:: single: Type Type ++++ This enumeration describes the type specifying in which format to send or receive data. .. index:: single: HttpContent.Unknown .. index:: single: HttpContent.PlainText .. index:: single: HttpContent.Binary .. index:: single: HttpContent.Json .. list-table:: :widths: auto :header-rows: 1 * - Name - Value - Description .. _enumitem_HttpContent_Unknown: * - ``HttpContent.Unknown`` - ``0`` - .. _enumitem_HttpContent_PlainText: * - ``HttpContent.PlainText`` - ``1`` - Send and receive data as plaintext. .. _enumitem_HttpContent_Binary: * - ``HttpContent.Binary`` - ``2`` - Send and receive data as raw bytes which can be accessed as an ``ArrayBuffer``. .. _enumitem_HttpContent_Json: * - ``HttpContent.Json`` - ``3`` - Send and receive data as JSON objects. Example ******* See :ref:`HttpHeader example ` on how to use HttpContent.