frisby icon indicating copy to clipboard operation
frisby copied to clipboard

Is it possible to send a post request without headers?

Open JoshuaConcon opened this issue 5 years ago • 2 comments

Wondering if this is possible, since every single time I send a request with headers: {}, I get the following back (when I use .inspectRequestHeaders().

Request Headers:
    Content-Type: application/json
    User-Agent: frisby/2.1.1 (+https://github.com/vlucas/frisby)

Is it possible to send an empty header?

JoshuaConcon avatar Aug 01 '19 16:08 JoshuaConcon

If you are setting the headers with .setup function, you can pass a parameter to replace the default options.

Your request probably will be something like that:

image

luuizeduardo avatar Aug 18 '19 21:08 luuizeduardo

Yes, the frisby.setup() method has a second argument to not merge, but set exactly what you provide. If you send that empty headers, it should work.

vlucas avatar Oct 21 '19 15:10 vlucas