Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Commit 65b9e12

Browse files
authored
Create README.md
1 parent aaf8032 commit 65b9e12

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# go-http-digest-auth-client
2+
Golang Http Digest Authentication Client
3+
4+
This client implements [RFC7616 HTTP Digest Access Authentication](https://www.rfc-editor.org/rfc/rfc7616.txt)
5+
and by now the basic features should work.
6+
7+
# Usage
8+
9+
```go
10+
// import
11+
import dac "github.com/xinsnake/go-http-digest-auth-client"
12+
13+
// create a new digest authentication request
14+
dr := dac.NewRequest(userId, userId, method, endUri, payload)
15+
response1, err := dr.Execute()
16+
17+
// check error, get response
18+
19+
// reuse the existing digest authentication request so no extra request is needed
20+
dr.UpdateRequest(userId, userId, "PUT", endUri, string(buf.Bytes()))
21+
response2, err := dr.Execute()
22+
23+
// check error, get response
24+
```
25+
# Todos
26+
27+
* Unit testing
28+
* Implement encoded username `username*`
29+
* Logging and debugging message

0 commit comments

Comments
 (0)