go-http-digest-auth-client
Golang Http Digest Authentication Client
This client implements RFC7616 HTTP Digest Access Authentication
and by now the basic features should work.
Usage
import dac "github.com/xinsnake/go-http-digest-auth-client"
dr := dac.NewRequest(username, password, method, uri, payload)
response1, err := dr.Execute()
dr.UpdateRequest(username, password, method, uri, payload)
response2, err := dr.Execute()
Or you can use it with http.Request
t := dac.NewTransport(username, password)
req, err := http.NewRequest(method, uri, payload)
if err != nil {
log.Fatalln(err)
}
resp, err := t.RoundTrip(req)
if err != nil {
log.Fatalln(err)
}
defer resp.Body.Close()
fmt.Println(resp)