# Responding to HTTP Requests

## Creating HTTP Endpoints

The [`HTTP Endpoint`](/midio-docs/built-in-nodes/http.md#endpoint) event can be used to handle requests to a, potentially parameterized, route. Responses can be sent using the [`Respond to HTTP Request`](/midio-docs/built-in-nodes/http.md#response) node.

<div align="center"><figure><img src="/files/eYGBV9LsuBahJKJERWOJ" alt="" width="563"><figcaption><p>This endpoint will handle call to https://&#x3C;your-project-name>.midio.dev:&#x3C;your assigned port><mark style="background-color:blue;"><strong>/foo/bar</strong></mark><strong>.</strong><br> <strong>Check out</strong> <a href="/pages/mxaneqPsbZUTZEm8Bk05"><strong>this guide</strong></a> <strong>for more information on how your endpoints are exposed to the public.</strong></p></figcaption></figure></div>

## Parameterised paths

The `path` parameter of [`HTTP Endpoint`](/midio-docs/built-in-nodes/http.md#endpoint) supports a simple URL templating scheme, which can be used to parameterize on path and query parameters. The syntax is as follows:

```
/:item1/:item2?q1&q2
```

This path will accept any resource with two **path items** and **query parameters** named `q1` and `q2`. The names can be anything. The values for the path items and query items will be made available as outputs on the [`HTTP Endpoint`](/midio-docs/built-in-nodes/http.md#endpoint) node.

<figure><img src="/files/gxVGlNQFVlf2gpK9nR62" alt="" width="375"><figcaption></figcaption></figure>

###


---

# 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.midio.com/midio-docs/guides/http/responding-to-http-requests.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.
