DELETE strips off content-type header
See original GitHub issue#### Summary
When sending DELETE
requests, Content-Type
header is not present even though manually set.
I think it has something to do with two things:
- https://github.com/mzabriskie/axios/blob/master/lib/adapters/xhr.js#L121-L123
- https://github.com/mzabriskie/axios/issues/897
#### Context
- axios version: e.g.: v0.15.3
- Environment: e.g.: node v7.6.4, chrome 60.0.3112.113, Mac 10.12
Issue Analytics
- State:
- Created 6 years ago
- Reactions:17
- Comments:17
Top Results From Across the Web
Remove Content type header when making an http request
PS: I understand what is multipart-form data. I just need to strip off that header. angularjs · http · http-headers.
Read more >HttpClient: How to Remove Charset From Content-Type Header
Solution is simple - we can create StringContent with whatever encoding and then set charset to empty string. ... This removes the charset ......
Read more >HttpClient: How to remove charset from ... - Gunnar Peipman
Here is how I got charset definition away from Content-Type header. ... This removes charset definiton from request content type header.
Read more >How to remove the Header on different pages in ... - YouTube
How to manually remove the headersHow to remove the headers differentlyHOw to remove the header from the cover pageHow to remove the header...
Read more >How do I remove a server-added header from proxied location?
security-headers.conf. add_header Referrer-Policy same-origin; add_header X-Frame-Options SAMEORIGIN; add_header X-Content-Type-Options nosniff ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any update here? I have the same issue. The rest api i am contacting allows two types of content type and i need to set it.
was having this issue also, this works for me:
.delete(url, { headers: { "Content-Type": "application/json" }, data: JSON.stringify(data) })