Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GM.xmlHttpRequest send supports more data types and deprecates binary key #708

Closed
ACTCD opened this issue Sep 4, 2024 · 0 comments · Fixed by #716
Closed

GM.xmlHttpRequest send supports more data types and deprecates binary key #708

ACTCD opened this issue Sep 4, 2024 · 0 comments · Fixed by #716
Assignees
Labels
deprecate Breaking changes enhancement Feature work

Comments

@ACTCD
Copy link
Collaborator

ACTCD commented Sep 4, 2024

It seems that the binary key comes from the ancient sendAsBinary() non-standard API.

Nowadays, the XMLHttpRequest: send() method has native support for multiple data types.

The binary key is only for data of type string and there is no need to continue to exist.

So the best way is to support these data types and remove the legacy binary key support.

A body of data to be sent in the XHR request. This can be (mdn/content@c61f29b):


References:

https://violentmonkey.github.io/api/gm/#gm_xmlhttprequest

data?: string | ArrayBuffer | Blob | DataView | FormData | ReadableStream | TypedArray | URLSearchParams

https://www.tampermonkey.net/documentation.php#api:GM_xmlhttpRequest

data - string|Blob|File|Object|Array|FormData|URLSearchParams?

@ACTCD ACTCD added enhancement Feature work deprecate Breaking changes labels Sep 4, 2024
@ACTCD ACTCD self-assigned this Sep 4, 2024
ACTCD added a commit to userscriptsup/testscripts that referenced this issue Sep 10, 2024
`GM.xmlHttpRequest` supports multi-type `data` and deprecates `binary` key
quoid/userscripts#708

`GM.xmlHttpRequest` return a promise resolved with `response` object
quoid/userscripts#712
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecate Breaking changes enhancement Feature work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant