trim
This commit is contained in:
parent
14c09bd59b
commit
9cee8be710
@ -1,18 +0,0 @@
|
||||
// ## HTTP Client Basic Auth
|
||||
|
||||
package main
|
||||
|
||||
import "net/http"
|
||||
import "io/ioutil"
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
req, _ := http.NewRequest("GET", "http://127.0.0.1:5000/", nil)
|
||||
req.SetBasicAuth("u", "supersecret")
|
||||
res, resErr := http.DefaultClient.Do(req)
|
||||
if resErr != nil { panic(resErr) }
|
||||
defer res.Body.Close()
|
||||
body, bodyErr := ioutil.ReadAll(res.Body)
|
||||
if bodyErr != nil { panic(bodyErr) }
|
||||
fmt.Print(string(body))
|
||||
}
|
@ -84,7 +84,6 @@ exit
|
||||
|
||||
## client libraries
|
||||
http-client
|
||||
http-client-basic
|
||||
https-client
|
||||
streaming-in-http-responses ~
|
||||
redis
|
||||
|
Loading…
x
Reference in New Issue
Block a user