A bridge between net/http and JS Fetch, made using the jsStreams library
Go to file
Tracker-Friendly f5b3297d9d Fixed tests, made it try to retry without streamed uploads on chromium if using Get() or Post() 2024-11-13 17:53:08 +00:00
tests Fixed tests, made it try to retry without streamed uploads on chromium if using Get() or Post() 2024-11-13 17:53:08 +00:00
.gitattributes Grrr stop detecting it as HTML 2024-10-28 09:51:12 +00:00
.gitignore Initial commit 2024-10-28 09:47:23 +00:00
LICENSE.md Initial commit 2024-10-28 09:47:23 +00:00
README.md Added some important notes 2024-11-13 17:48:26 +00:00
go.mod Update jsStreams version 2024-10-28 10:13:42 +00:00
go.sum Update jsStreams version 2024-10-28 10:13:42 +00:00
main.go Fixed tests, made it try to retry without streamed uploads on chromium if using Get() or Post() 2024-11-13 17:53:08 +00:00

README.md

jsFetch

Go library to bridge net/http and the JS Fetch API, without actually importing net/http. Made using the jsStreams library.

Go Report Card Go Reference

The API is exactly the same as net/http.

Important note

It is common for it to return the error "Failed to fetch" with the error ERR_H2_OR_QUIC_REQUIRED in Chromium-based browsers. To fix this, you are able to modify the request to set request.DisableStreamedClient to true. This is because Chromium has a method of upload ReadableStream data that requires HTTP/2 or QUIC to be enabled for security reasons.