await (await fetch("https://corsproxy.io/?url=https://old.reddit.com/r/ProgrammerHumor/api/link_flair_v2.json")).json()
{"error":"Free usage is limited to localhost and development environments. Get an API key at https://corsproxy.io/pricing/"}
Yeah, the problem is that the response object is not instantiated until after the first promise is fulfilled. So, there's no way to get a reference to the Response's JSON method because it doesn't exist yet.
23
u/Littux Feb 08 '26 edited Feb 14 '26
You're saying I can freely access the reddit API without paying anything? That will be useful for a project (website)
9
u/toi80QC Jan 30 '26
Works on my PC
1
u/MurkyWar2756 Jan 30 '26 edited Feb 01 '26
await (await fetch("https://corsproxy.io/?url=https://example.com&key=webdemo1")).text();also worksEdit: changed Β to
.2
u/-VisualPlugin- Feb 04 '26
That's what I'd call proxying a CORS proxy.