11 lines
857 B
Markdown
11 lines
857 B
Markdown
# jsFetch
|
|
|
|
Go library to bridge net/http and the JS Fetch API, without actually importing net/http.
|
|
Made using the [jsStreams](https://git.ailur.dev/Ailur/jsStreams) library.
|
|
|
|
[![Go Report Card](https://goreportcard.com/badge/git.ailur.dev/ailur/jsFetch)](https://goreportcard.com/report/git.ailur.dev/ailur/jsFetch) [![Go Reference](https://pkg.go.dev/badge/git.ailur.dev/ailur/jsFetch.svg)](https://pkg.go.dev/git.ailur.dev/ailur/jsFetch)
|
|
|
|
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. |