Content Types

Content Type refers to the format and structure of the data being sent or received as part of a message. Connector types and protocols, refer to the mechanism used to transmit the message from one system to another.

The relationship between content types and connector types/protocols comes into play when sending or receiving messages. For example, if you want to send a message containing JSON data over HTTP, you would need to use an HTTP connector and set the content type of the message to application/json so that the receiving system knows how to interpret the data.

GLU connectors support various content types for messages, which can be specified using the Content-Type selector. The following are the content types that GLU supports:

text/plain: This content type is used for plain text messages, such as email or SMS messages.

application/xml: This content type is used for XML documents, which are commonly used for data exchange between systems. The correct Content type for XML documents is application/xml or text/xml. In GLU, you can use either of these Content Types to specify the content type of XML documents being sent as part of a message to an external system or API. The application/xml type is more commonly used, and it indicates that the content of the message is an XML document. The text/xml type is also valid, but it is less commonly used and has the same semantics as application/xml.

application/json: This content type is used for JSON documents, which are commonly used for data exchange between systems.

application/octet-stream: This content type is used for binary data, such as images or audio files.

multipart/form-data: This content type is used for submitting data that includes binary data, such as file uploads.

application/x-www-form-urlencoded: This content type is used for submitting form data encoded as key-value pairs, such as HTML form submissions. Parameters being passed in to this content type cannot include special characters. In order to encode these, you can apply the following function to the parameters before sending them on an outbound request. URL_ENCODER


application/soap+xml: This content type is used for SOAP messages, which are commonly used for web services communication.

application/atom+xml: This content type is used for Atom feeds, which are commonly used for syndicating web content.

application/rss+xml: This content type is used for RSS feeds, which are commonly used for syndicating web content.

application/pdf is a legitimate content type used for Portable Document Format (PDF) documents. PDF is a popular file format used for document exchange, and it is widely supported by various software applications and platforms. In GLU, you can use the application/pdf content type to send PDF documents as part of a message to an external system or API.

text/xml; charset=UTF-8 is a content type that indicates that the content of the message is an XML document encoded in the UTF-8 character set. The text/xml media type is used to indicate that the content of the message is a text-based XML document, and the charset parameter is used to specify the character encoding of the document. It’s worth noting that the application/xml content type is more commonly used to indicate that the content of the message is an XML document, and it also allows you to specify the character encoding using the charset parameter. Therefore, you can also use application/xml; charset=UTF-8 to specify that the content of the message is an XML document encoded in UTF-8.

application/xml; charset=UTF-8 is a valid content type that indicates that the content of the message is an XML document encoded in the UTF-8 character set. The application/xml media type is used to indicate that the content of the message is an XML document, and the charset parameter is used to specify the character encoding of the document.

application/jose is a valid content type that is used for representing encrypted and/or signed JSON data. JOSE (JSON Object Signing and Encryption) is a set of specifications that define a way to secure data using JSON format. It provides a way to digitally sign, encrypt, and/or authenticate JSON data, which can be useful for secure communication between systems and services. In GLU, you can use application/jose as the content type for sending and receiving JOSE-formatted messages. GLU supports working with JSON Web Tokens (JWTs) and JSON Web Encryption (JWE) messages. GLU allows you to create, verify, and decode JWTs, as well as encrypt and decrypt JWE messages. For signed messages, the alg parameter is used to specify the signing algorithm, while for encrypted messages, the enc parameter is used to specify the encryption algorithm.

It’s worth noting that there are several other media types related to JOSE, such as application/jwt for JSON Web Tokens, application/jwe for JSON Web Encryption, and application/jws for JSON Web Signatures. These media types are used to indicate specific types of JOSE messages and may have additional parameters for specifying the algorithm and other metadata.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
Fill the form and we’ll contact you shortly

    I agree with

    cookies
    We uses cookies to make your experience on this website better. Learn more
    Accept cookies