diff --git a/net/http/tinygo.go b/net/http/tinygo.go index c533127..d0f62c4 100644 --- a/net/http/tinygo.go +++ b/net/http/tinygo.go @@ -56,6 +56,9 @@ func (c *Client) doHTTP(req *Request) (*Response, error) { if p == "" { p = "/" } + if req.URL.RawQuery != "" { + p += "?" + req.URL.RawQuery + } fmt.Fprintln(conn, req.Method+" "+p+" HTTP/1.1") fmt.Fprintln(conn, "Host:", req.URL.Host) @@ -114,6 +117,9 @@ func (c *Client) doHTTPS(req *Request) (*Response, error) { if p == "" { p = "/" } + if req.URL.RawQuery != "" { + p += "?" + req.URL.RawQuery + } fmt.Fprintln(conn, req.Method+" "+p+" HTTP/1.1") fmt.Fprintln(conn, "Host:", req.URL.Host)