Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client provides the basic API for sending HTTP requests
Example ¶
cl := &Client{} resp, err := cl.CtxDo(context.Background(), &Request{ Method: "GET", URL: "http://www.google.com/?a=b", Header: http.Header{ // "Connection": {"close"}, }, }) if err != nil { fmt.Println(err) return } defer resp.Body.Close() b, err := io.ReadAll(resp.Body) fmt.Println(err) fmt.Println(string(b))
Output:
Click to show internal directories.
Click to hide internal directories.