TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Wrap the sample JSON in a JSONP callback

GEThttps://api.testingapis.com/api/formats/jsonpSign in to see this endpoint's URL

Served as application/javascript. The body is prefixed with /**/ to guard against content-sniffing attacks.

Parameters 1

NameTypeDescription
callbackquery · stringJavaScript function name: an identifier, dots allowed, max 64 chars. Default callback; an empty value also uses the default. Default: "callback".

Responses

200
Success.
400
callback is not a valid identifier or is too long.

Example

Request
curl -X GET "https://api.testingapis.com/api/formats/jsonp?callback=handleData" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
Content-Type: application/javascript; charset=utf-8

/**/handleData({"id":1,"name":"Alice Johnson","email":"alice@example.com","roles":["admin","editor"],"active":true,"score":98.5,"manager":null});

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.