I\'ve tried to use fetch to call from backend using react, without libs (such as Axios). So I created this function:
export function api(url, method, body, i
This also happened to me when I tried to add an Authorization header to my fetch calls. In my case it was caused by a newline character in the header string, i.e. Bearer:\nsomelong-token. Changing the new line to a space solved the problem.
Authorization
Bearer:\nsomelong-token