This is sample that POST request via http/1 failed on binary built by go1.21.0, because request streaming is not supported via http/1 on Google Chrome. For details, see issue.
% go version
go version go1.21.0 darwin/arm64
darwin/arm64 may not be needed.
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./static
GOOS=js GOARCH=wasm go build -o static/main.wasm browser.go && go run server.go -port 8500
If run server.go with -tls
option, the post request will success.