I need all pipeline in my react ui. i call through api …but it give me “CORS error”…
useEffect(() => {
const options = {
qs: { branch: “SOME_STRING_VALUE”, “page-token”: “SOME_STRING_VALUE” },
headers: { authorization: process.env.CIRCLE_TOKEN },
};
fetch(
“https://circleci.com/api/v2/project/gh/created-by-cocoon/circleci_test_repo/pipeline”,
options
)
.then((response) => response.json())
.then((data) => console.log(data))
.catch((err) => console.error(err));
}, );