When configuring an HTTP integration with a body, you must choose a value in the Content Type dropdown. In all cases, this dropdown will set the "Content-Type" header on your request. The sections below provide more information on the individual content types and what they mean in the context of the integration.
The Document and Multipart Form Data Content Types can be used to send binary documents with your integrations
a!toJson(). You should not use this content type when sending primitive types.
eXtensible Markup Language (XML) is a data-interchange format that is commonly used for SOAP web services, though it is also compatible with REST. It is composed of nested units called elements that form data structures similar to Appian dictionaries and complex data types. When selecting this value for your Content Type, you need to manually convert Appian data to XML. To convert an Appian value to XML, use
toxml(). In general, you should not use this content type when sending primitive types.
The Document Content Type option allows you to send files to external systems. Choosing this option affects your request in three ways:
Some services require data to be sent as multipart/form-data. This is typical for services that upload documents. Multipart HTTP requests can send multiple types of data in a single request, such as structured text and unstructured binary data. For example, sending JSON or XML data (structured text) along with files (unstructured binary data). In Appian, choosing the Multipart Form Data (multipart/form-data) for the Content Type allows you to configure this type of request. For more information on multipart requests in general, see the RFC.
Documents can be sent as form part values. See the above section for more details on sending documents.
Document parts are sent differently than non-document parts. Unlike non-document parts, document parts are never fully stored in memory, making it safe to send large files through a multipart request.
You can send as many form parts as you want. However, there is a limit of 75 MB per request. This means you can send one 75 MB file, or three 25 MB files, but you cannot exceed 75 MB across all files that are being sent.
If you have a static number of form parts that don't require additional logic, select Specify data for each part and use the form to specify the fields.
You can also use an expression to define the form parts by selecting Define all parts with a single expression. This can be helpful if you need conditional logic, such as sending optional files. See a!httpFormPart() for more information on setting up the expression.
Choosing this option sets the Content-Type header
text/plain, which is the generic media type for plain text. This content type is rarely used by APIs.
Selecting the Custom option allows you to set content-type manually. This should be used when you cannot leverage any of the provided content-type options. Note that only text-based media types can be sent through integrations in this way, and the charset will automatically be set to UTF-8.
On This Page