POST / PUT

methodstringGET

To send a POST or PUT request, send the request to the main endpoint with your api_key and url parameters, and specify the HTTP method using the method parameter.

Data will be forwarded transparently to the target web page. Headers and cookies will also be returned.

Below is an example using httpbin.org, a service mirroring HTTP requests sent to the site.

Example: POST request with form data

1
curl -X "POST" "https://www.foxscrape.com/api/v1/?url=https%3A%2F%2Fhttpbin.org%2Fanything&api_key=YOUR_API_KEY&method=POST" \
2
-H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
3
--data-urlencode "KEY_1=VALUE_1"

Example: PUT request

1
curl -X "PUT" "https://www.foxscrape.com/api/v1/?url=https%3A%2F%2Fhttpbin.org%2Fanything&api_key=YOUR_API_KEY&method=PUT" \
2
-H 'Content-Type: application/json' \
3
-d '{"key": "value"}'

The method parameter accepts the following values: GET (default), POST and PUT.