Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Setup custom values in header not work. #259

Open
TiagoSAmaral opened this issue May 19, 2022 · 0 comments
Open

Setup custom values in header not work. #259

TiagoSAmaral opened this issue May 19, 2022 · 0 comments

Comments

@TiagoSAmaral
Copy link

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:

headers.delete('content-type'); // content-type will be set by `window.fetch` to includy boundary

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 TiagoSAmaral changed the title Setup custom values to POST not work. Setup custom values in header not work. May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant