Skip to content
Advertisement

invalid header error on sending a request with curl

here is my code

JavaScript

i keep getting

JavaScript

Advertisement

Answer

You are surprisingly getting the error

JavaScript

Because you use an invalid header name 🙂

You use

JavaScript

Notice the space in the header name

The correct usage would be:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement