Library just for http digest auth, and refer RFC-2617
get -u -v github.com/Soontao/goHttpDigestClient
func TestClientAuthorize(t *testing.T) {
req, err := http.NewRequest("GET", testDigestAuthServerURL, nil)
if err != nil {
t.Fatal(err)
}
opt := &ClientOption{username: testServerUsername, password: testServerPassword}
res, err := DefaultClient.Do(req, opt)
}
- if option in Client, only need 1 request get challenge