To get data from https://example.com/ (using jQuery)
$.get('https://cors-beta.vercel.app/get?url=https://example.com/', function(res){
console.log(res);
});
To post data to https://example.com/ (using jQuery)
$.post("https://cors-beta.vercel.app/post", {
url: "https://example.com/",
headers: JSON.stringify({
'X-Requested-With': 'XMLHttpRequest',
'Cookie': 'myCookies',
}),
body: "name=John&age=21",
return: "headers"
}, function(res){
console.log(res);
});
Options
url
Description:
Resource URL (required option)
Example:
https://cors-beta.vercel.app/get?url=https://example.com/
return
Description:
What will be displayed as result, this option can have 4 values:
"status" will display statusCode"headers" will display response headers"response" will display all response dataothers (default) will display body content
Example:
https://cors-beta.vercel.app/get?return=headers&url=https://t.me/
Options (All options are introduced using form data)
url
Description:
Resource URL (required option)
Example:
url="https://example.com/"
headers
Description:
Request headers (string values), you can also use javascript object with JSON.stringify() function
Example:
headers="{'X-Requested-With': 'XMLHttpRequest', 'Cookie': 'myCookies'}"
body
Description:
Body data values (also string values)
Example:
body="name=John&age=21"
return
Description:
What will be displayed as result, this option can have 4 values:
"status" will display statusCode"headers" will display response headers"response" will display all response dataothers (default) will display body content
Example:
return="headers"
POST /request
Description:
The same as /post but have additional parameter method thats contains request method GET, POST, OPTIONS, PUT, PATCH, DELETE
Example:
method="PUT"