http icon indicating copy to clipboard operation
http copied to clipboard

Setup custom values in header not work.

Open TiagoSAmaral opened this issue 2 years ago • 0 comments

Describe the bug I try setup the header of request, with the value content-type with application/json, but this not working in browser. This is removed from header.

No value is accepted with the content-type key. I saw in the implementation that the content-type is removed, having a comment: https://github.com/capacitor-community/http/blob/27dc4c858f1eb742622bc71c590f8aa351ef8221/src/request.ts#L102

To Reproduce To reproduce, try setup a post request, and did set header with value: content-type: application/json.

Expected behavior Expect that { content-type: application/json } reaches the server.

Desktop (please complete the following information):

Im develop a ionic application using Ionic 6, with Capacitor V3. Runing application with command: ionic serve --lab

  • OS: macOS Monterey
  • Browser Chrome
  • Version 101.0.4951.64

TiagoSAmaral avatar May 19 '22 22:05 TiagoSAmaral