1. Home
  2. Integrations
  3. Set Headers

Set Headers

Learn how to use EIPs

The Set Headers EIP defines or modifies multiple HTTP headers simultaneously in a single step, optimizing configuration when you need to set several headers at once.

NOTE

To configure headers individually, one per step, use the Set Header EIP.

Parameters

Parameter
Description
Default value
Type
Headers(required) Displays the headers that will be defined or modified.List

Example

This flow returns mocked information for 4 courses from an online school and sets headers for tracking:

Returned response:

How it works:

Receives POST request on the /buscar-cursos endpoint.

Logs message informing the start of the search.

Defines the body with mocked data for 4 courses (name, workload, and price) using setBody.

Defines 3 headers using setHeaders:

  • Content-Type: content type (JSON)
  • X-School-ID: school identifier
  • X-Request-Timestamp: request date/time
NOTE

The Set Headers EIP requires the use of expressions to define headers. To better understand what expressions are and learn about the most common types, refer to the Expressions section and Expression Languages.

Logs message with the retrieved courses and returns the JSON as response.

The video below demonstrates filling in the headers:

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more