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

Forward a request to an upstream URL and relay its response

POSThttps://api.testingapis.com/api/Proxy/callSign in to see this endpoint's URL

Returns 200 with the upstream status, statusText and raw body (as a string) whatever the upstream status was.

Note: Forwards any HTTP request server-side and returns the upstream status and raw body.

Request body

Optional. application/json, text/json, application/*+json, application/xml, text/xml, application/*+xml. Model: ApiRequestData. endpointUrl (absolute http or https URL), methodName (GET, POST, ...) and an optional requestBody, sent as JSON except for GET and HEAD.

Example body
{"endpointUrl": "https://httpbin.org/get", "methodName": "GET", "requestBody": ""}

Responses

200
Upstream status, statusText and body.
400
endpointUrl isn't an absolute http(s) URL, or methodName is missing.
502
The upstream request failed or timed out.

Example

Request
curl -X POST "https://api.testingapis.com/api/Proxy/call" \
  -H "Content-Type: application/json" \
  -d '{"endpointUrl": "https://httpbin.org/get", "methodName": "GET", "requestBody": ""}' \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{
  "status": 200,
  "statusText": "OK",
  "body": {\n  \args\: {}, \n  \headers\: {\n    \Host\: \httpbin.org\, \n    \Traceparent\: \00-28f8fb2606d6a8a5236ddc630313607a-65e44e7a…
}

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.