Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewRequest = http.NewRequest
View Source
var Transporter *http.Transport
Functions ¶
func Client ¶
Example ¶
package main import ( "fmt" "io" "time" "simonwaldherr.de/go/golibs/http" ) func main() { client := http.Client(time.Second * 15) resp, err := client.Get("http://localhost:8081/hello") if err != nil { fmt.Println(err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { fmt.Println(err) } fmt.Println(string(body)) }
Output: hello world
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.