We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const res = await fetch(url, { method: "POST", headers: new Headers({ "Content-Type": "application/json", token }), credentials: "same-origin", body: JSON.stringify(data), });
I am expecting the token in our API like so
async handler({ request }) { if (request.method !== "POST") { throw new BadRequestError("Method not supported!"); } const { price, metadata = {} } = await request.json(); const token = request.headers.get("token"); console.log(token); // undefined here only in local -----------
But it works when deployed. Any idea why?
The text was updated successfully, but these errors were encountered:
My bad. I was looking at the wrong console. Sorry!
Sorry, something went wrong.
No branches or pull requests
I am expecting the token in our API like so
But it works when deployed.
Any idea why?
The text was updated successfully, but these errors were encountered: