JSFiddle Docs
  • JSFiddle Docs & Help
  • Getting started
  • Panels settings
  • Editor settings
  • Fiddle meta
  • External resources
  • Embedding fiddles
  • Async requests
  • Github Integration
    • Display fiddle from a Github repository
    • Display fiddle from Gist
    • Pass response directly from a Github repo
    • Pass response directly from Gist
  • API
    • Displaying user fiddles
    • Display a fiddle from POST
    • Get username
  • Use cases
    • Demos for products or libraries
    • Bug reporting (test-case) for Github Issues
    • Answers on Stack Overflow
    • Live code collaboration
    • Conducting live interviews for developer positions
    • Code snippets hosting
Powered by GitBook
On this page
  • HTML
  • JSON
  • JSONP
  • XML

Async requests

PreviousEmbedding fiddlesNextGithub Integration

Last updated 5 years ago

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.

Asynchronous requests are split to HTML, JSON, JSONP and XML. and responses are similar to the echo feature and go nicely in pair with storing fiddles in and .

HTML

URL: /echo/html/

Data has to be provided via POST.

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

JSON

Data has to be provided via POST.

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

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.

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

Data has to be provided via POST

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]

Gist
github
gist
github