Skip to content

Conversation

@ONEX1
Copy link

@ONEX1 ONEX1 commented Jul 12, 2025

  1. Supports both application/json and application/x-www-form-urlencoded POST requests

  2. Injects raw POST data directly into the browser using:

  • injection for x-www-form-urlencoded
  • XMLHttpRequest for application/json
  1. Handles custom headers via:
  • in form-based POST
  • setRequestHeader in JSON XHR

@jiongjiongJOJO
Copy link

3. Handles custom headers via:

  • in form-based POST
  • setRequestHeader in JSON XHR

I really need this feature, hope it can be merged as soon as possible.

@jiongjiongJOJO
Copy link

jiongjiongJOJO commented Aug 13, 2025

@ONEX1 GET method not support headers arg.

@vwkd
Copy link

vwkd commented Oct 12, 2025

This would fix #266.

Along a headers option, this also adds a contentType option to distinguish between JSON and default form data body and sets the Content-Type header depending on it. I think it would be better to simply depend on a Content-Type header in the headers option, which is one less additional option and is conceptually more aligned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants