advanced-rest-client / arc-electron

Advanced REST Client - Desktop application
Other
1.42k stars 225 forks source link

Adding application/x-www-form-urlencoded automatically when in POST+application/x-www-form-urlencoded mode ? #490

Closed Gregwar closed 1 year ago

Gregwar commented 1 year ago

Expected Behavior When selecting "application/x-www-form-urlencoded" for parameter transmission, I'd expect the Content-type header to be set to application/x-www-form-urlencoded if not specified otherwise.

Because it is missing with ARC, it causes POST parameters to be skipped by the server (I am using Symfony dev server as a back-end). I have to manually add application/x-www-form-urlencoded as Content-type when passing POST parameters.

Actual behavior The Content-type header is absent, for example:

POST /api/message HTTP/1.1
Host: localhost:1234
content-length: 16

text=Hello world

To Reproduce By setting up any request with POST and not specifying the Content-type manually in the header section

Additional Information

This is the default behaviour for curl for instance.

So, in my current setup, the ARC request fails to be processed, while the curl code snippet works.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity and is not currently prioritized. It will be closed in a week if no further activity occurs :)

stale[bot] commented 1 year ago

If you still think this issue is relevant, please ping a maintainer or leave a comment!