# On HTTP Route

## Overview

![The On HTTP Route Node.](https://1553081948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU990HLHWA30dTfELtDUK%2Fuploads%2Fgit-blob-10d021bc22ae0e21bb0b0f606e504a86551e385a%2Fonhttproutenode20241.png?alt=media)

**On HTTP Route** is an **Event Listener Node** that executes when a `Request` is received by a specific **Route**, which is set up in the `Attributes`, and returns the data defined by the outputs. A **Route** is made up of a `Method` and `URL`.

The **Node** changes with each **Route** added. Please refer to the [example](#example) for more information.

[**Scope**](https://github.com/cgi-studio-gmbh/incari-doc/blob/2025.1/toolbox/communication/overview.md#scopes): **Project**, **Scene**.

## Attributes

![The On HTTP Route Node Attributes.](https://1553081948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU990HLHWA30dTfELtDUK%2Fuploads%2Fgit-blob-b7ef4186dd1694b0b64450b5420de2e4310435af%2Fonhttprouteattributes2.png?alt=media)

| Attribute        | Type             | Description                                                                                                                                                                                                                         |
| ---------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Configuration`  | **Drop-down**    | The desired *HTTP(S)* server, which refers back to the selections made under *HTTP* in the [**Project Settings**](https://docs.incari.com/incari-studio/modules/project-settings/http).                                             |
| `Routes`         | **Add Elements** | A `Route` is made up of its *HTTP* `Method` (either **GET**, **POST**, **DELETE**, **PUT**, or **HEAD**) and its URL.                                                                                                               |
| `Is Body Binary` | **Bool**         | The user chooses true or false depending on whether they wish for the `Body` output to remain a **String** or be converted into *binary*. This **Attribute** is only available for the `Methods` **POST**, **PUT**, and **DELETE**. |

## Outputs

| Output                   | Type             | Description                                                                                                                                                                                                                                             |
| ------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `path/name (METHOD)` (►) | **Output Pulse** | An **Output Pulse** which appears when a **Route** is created and a `Method` is chosen. It executes when a `Request` is received by the **Route**. Since it is possible to have multiple **Routes**, it is possible to have multiple **Output Pulses**. |
| `Headers`                | **Dictionary**   | *HTTP* headers in the form of key/value pairs.                                                                                                                                                                                                          |
| `Query`                  | **Dictionary**   | Parameters of the call in the form of key/value pairs.                                                                                                                                                                                                  |
| `Request ID`             | **CustomID**     | The unique ID of the request, which can then be used by [**HTTP Response**](https://docs.incari.com/incari-studio/toolbox/communication/http/httpresponse).                                                                                             |
| `Body`                   | **String**       | The body of the response, usually including *HTML* text. This **Attribute** is only available for the `Methods` **POST**, **PUT**, and **DELETE**.                                                                                                      |

## Example

To better demonstrate the differences between the `Methods` and how that translates to changes in the **Node**, please refer to the following image:

![On HTTP Route Node](https://1553081948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU990HLHWA30dTfELtDUK%2Fuploads%2Fgit-blob-aef516e5f3ce7b61b79dc6984ad12f5ada19066e%2Fonhttproutenodeexample%20-%20Copy.png?alt=media)

Every `Method`creates a new **Output Pulse** for that specific `Method`, along with the provided *URL* given in the **Attributes** section. If there are multiple `Methods`, some **Outputs** are shared. These are `Headers`, `Query`, and `Request ID`, which appear at the bottom of the **Node**. For the `Methods` that return the **String Output** `Body`, a separate `Body` **Output** is created for each.

## External Links

* [Different *HTTP* Methods](https://www.w3schools.com/tags/ref_httpmethods.asp) on W3Schools.
