mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-17 05:13:23 +00:00
Add support for req.URL.RawQuery
This commit is contained in:
@@ -56,6 +56,9 @@ func (c *Client) doHTTP(req *Request) (*Response, error) {
|
|||||||
if p == "" {
|
if p == "" {
|
||||||
p = "/"
|
p = "/"
|
||||||
}
|
}
|
||||||
|
if req.URL.RawQuery != "" {
|
||||||
|
p += "?" + req.URL.RawQuery
|
||||||
|
}
|
||||||
fmt.Fprintln(conn, req.Method+" "+p+" HTTP/1.1")
|
fmt.Fprintln(conn, req.Method+" "+p+" HTTP/1.1")
|
||||||
fmt.Fprintln(conn, "Host:", req.URL.Host)
|
fmt.Fprintln(conn, "Host:", req.URL.Host)
|
||||||
|
|
||||||
@@ -114,6 +117,9 @@ func (c *Client) doHTTPS(req *Request) (*Response, error) {
|
|||||||
if p == "" {
|
if p == "" {
|
||||||
p = "/"
|
p = "/"
|
||||||
}
|
}
|
||||||
|
if req.URL.RawQuery != "" {
|
||||||
|
p += "?" + req.URL.RawQuery
|
||||||
|
}
|
||||||
fmt.Fprintln(conn, req.Method+" "+p+" HTTP/1.1")
|
fmt.Fprintln(conn, req.Method+" "+p+" HTTP/1.1")
|
||||||
fmt.Fprintln(conn, "Host:", req.URL.Host)
|
fmt.Fprintln(conn, "Host:", req.URL.Host)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user