-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hi, thank you for the project!
I am wondering if I am wrong something with this simple PoC:
package main
import (
"fmt"
"net/http"
_ "github.com/stealthrocket/net/http"
)
func main() {
// Use hostname in URL so TLS certificate validation succeeds.
resp, err := http.Get("https://httpbin.org/anything")
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
fmt.Println("Response Headers:", resp.Header)
}
$ GOOS=wasip1 GOARCH=wasm go build -o main.wasm main.go
$ wasmedge main.wasm
panic: Get "https://httpbin.org/anything": dial httpbin.org:443 httpbin.org:443: lookup httpbin.org on [::1]:53: Connection refused
goroutine 1 [running]:
main.main()
...golang-wasm/http/main.go:16 +0x20
Also tried with macOS and Linux, with wasirun and nothing, it seems that lookup fails.
Metadata
Metadata
Assignees
Labels
No labels