Getting Started
To use Corsfix, add https://proxy.corsfix.com/?
before your URL when making fetch requests.
Basic Usage
Section titled “Basic Usage”// Instead of direct fetchfetch("https://api.example.com/data");
/* Add Corsfix URL before the API https://proxy.corsfix.com/? + https://api.example.com/data*/fetch("https://proxy.corsfix.com/?https://api.example.com/data");
Example
Section titled “Example”// GET requestfetch("https://proxy.corsfix.com/?https://api.example.com/users") .then((response) => response.json()) .then((data) => console.log(data));
// POST requestfetch("https://proxy.corsfix.com/?https://api.example.com/users", { method: "POST", body: JSON.stringify({ name: "John" }), headers: { "Content-Type": "application/json", },});