# On HTTP Route

## Overview

![The On HTTP Route Node.](/files/yacxKEOYHURS9xZYPJ52)

**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/2023.1/toolbox/communication/overview.md#scopes): **Project**, **Scene**.

## Attributes

![The On HTTP Route Node Attributes.](/files/dbrusEiYptIkbezFoWOm)

| Attribute        | Type             | Description                                                                                                                                                                                                                         |
| ---------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Configuration`  | **Drop-down**    | The desired *HTTP(S)* server, which refers back to the selections made under *HTTP* in the [**Project Settings**](/incari-studio/2023.1/modules/project-settings/http.md).                                                          |
| `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**](/incari-studio/2023.1/toolbox/communication/http/httpresponse.md).                                                                                                          |
| `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](/files/iZph1JUxRYDwVDtM3wrG)

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.incari.com/incari-studio/2023.1/toolbox/communication/http/events/onhttproute.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
