Your second one sends a form-encoded body but says it’s json in the content-type header. You’re also missing a comma in both examples after the headers object, before body.
Are you doing this in browser or node?
Your second one sends a form-encoded body but says it’s json in the content-type header. You’re also missing a comma in both examples after the headers object, before body.
Are you doing this in browser or node?