Content type inserter

[io/http/utils/Content type inserter]


Inserts content type into a HTTP request header. Example:

  1. {}@0 received via headers

  2. "application/json"@0 received on content type

  3. {"Content-Type": "application/json"}@0 sent via headers


Keywords: header, http, request, response

Input ports

  • headers: {string: string}

    Recieves request headers. It is used to describe a resource, or the behavior of the server or the client. Example: { "content-type": "application/json; charset=utf-8" }

  • content type: string

    Receives the content type to be inserted into the headers. Examples:

    • "application/json"

    • "text/plain"

Output ports

  • headers: {string: string}

    Sends the received request headers with the content type header added to it. Example: { "Content-Type": "application/json" }

Last updated