# Async requests

To improve user experience **Echo** features has been created. This allows to test asynchronous requests, add javascript files, create workers - all from one fiddle, so it is more transparent for the user reading the code.&#x20;

Asynchronous requests are split to **HTML**, **JSON**, **JSONP** and **XML**. [*Gist*](http://doc.jsfiddle.net/use/gist_response.html#gist-response) and [*github*](http://doc.jsfiddle.net/use/github_response.html#github-response) responses are similar to the echo feature and go nicely in pair with storing fiddles in [*gist*](http://doc.jsfiddle.net/use/gist_read.html#gist-read) and [*github*](http://doc.jsfiddle.net/use/github_read.html#github-read).

## HTML

**URL:** `/echo/html/`

{% hint style="info" %}
Data has to be provided via **POST**.
{% endhint %}

| Option key | Description                                                           |
| ---------- | --------------------------------------------------------------------- |
| **html**   | Data has to be provided via POST                                      |
| **delay**  | (Optional) It’s a time in seconds after which data should be returned |

{% embed url="<https://jsfiddle.net/6he52mnr/1/>" %}

## JSON

{% hint style="info" %}
Data has to be provided via **POST**.
{% endhint %}

**URL:** `/echo/json/`

| Option key | Descriptio                                                                                                    |
| ---------- | ------------------------------------------------------------------------------------------------------------- |
| **json**   | JSON string representing the object jsFiddle should return. It has to be valid JSON or error will be returned |
| **delay**  | (Optional) It’s a time in seconds after which data should be returned                                         |

\[Missing embed]

## JSONP

{% hint style="info" %}
Data has to be provided via **GET**. JSFiddle will respond all data given in request. It uses URL **with host and protocol** as it’s loaded from different domain. `callback` and `delay` will not be returned.
{% endhint %}

**URL:** `https://jsfiddle.net/echo/jsonp/`

| Option key   | Description                                                           |
| ------------ | --------------------------------------------------------------------- |
| **callback** | name of the jsonp function                                            |
| **delay**    | (Optional) It’s a time in seconds after which data should be returned |

\[Missing embed]

## XML

{% hint style="info" %}
Data has to be provided via **POST**
{% endhint %}

**URL:** `/echo/xml/`

| Option key | Description                                                           |
| ---------- | --------------------------------------------------------------------- |
| **xml**    | Valid string representing XML code                                    |
| **delay**  | (Optional) It’s a time in seconds after which data should be returned |

\[Missing embed]


---

# 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.jsfiddle.net/async-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.
