Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 782 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 782 Bytes

Usage

curl https://corsproxy.deta.dev/https://example.com/

html = await fetch('https://corsproxy.deta.dev/https://example.com/').then(r=>r.text())
console.log(html)

POST request

curl -X POST -H "Content-Type: application/json" -d '{"Name":"John Doe", "Age":"5"}' https://corsproxy.deta.dev/https://httpbin.org/post
res = await fetch('https://corsproxy.deta.dev/https://httpbin.org/post', {method: 'POST', body: '{"Name":"John Doe", "Age":"5"}'}).then(r=>r.json())
console.log(res)

Status code

https://corsproxy.deta.dev/https://httpbin.org/status/404

Debug

git clone https://github.com/GitHub30/express-cors-anywhere
cd express-cors-anywhere
npm install

node app.js

Deploy

deta deploy