Skip to content

Commit

Permalink
[client] used common request creator for Set, help n docs updated
Browse files Browse the repository at this point in the history
Signed-off-by: AbhishekKr <[email protected]>
  • Loading branch information
abhishekkr committed Jan 5, 2018
1 parent e7a80ba commit bc15545
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Since v1.1 Dory binary can be used in dual mode, server and client.

quick try using docker [abhishekkr/dory:0.3-alpine](https://hub.docker.com/r/abhishekkr/dory/)
quick try using docker [abhishekkr/dory:1.2-alpine](https://hub.docker.com/r/abhishekkr/dory/)

#### Dory Server

Expand Down
2 changes: 1 addition & 1 deletion dory.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (
doryVal = flag.String("val", "", "value to be provided to dory, required when trying to Post or Delete a key")
doryValFile = flag.String("val-from", "", "value from a file to be provided to dory, required when trying to Post or Delete a key")
doryToken = flag.String("token", "", "token for secret, required when trying to Get or Delete a key")
doryClientAxn = flag.String("task", "ping", "the kind of action dory client need to perform, supports {set,get,del,list,purge,ping}; defaults ping")
doryClientAxn = flag.String("task", "ping", "the kind of action dory client need to perform, supports {set,get,del,list,purge,purge-one,ping}; defaults ping")
doryKeyTTL = flag.Int("ttl", 300, "ttl for key, if it's set task for cache datastore; defaults 300 sec")
doryPersist = flag.Bool("persist", false, "to decide datastore as cache or disk, defaults as false for cache")
doryReadNKeep = flag.Bool("keep", false, "to decide if to purge key post read or not, defaults as false for purge on read")
Expand Down
4 changes: 1 addition & 3 deletions doryClient/clientHTTP.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ func (dory *DoryClient) Set() (err error) {
dory.Key = fmt.Sprintf("dory-%s", golrandom.Token(10))
}

request := golhttpclient.HTTPRequest{}
dory.httpUserUrl(&request)
dory.httpParams(&request)
request := dory.httpUserRequest()
request.Body = bytes.NewBuffer(dory.Value)

dory.Token, err = request.Post()
Expand Down

0 comments on commit bc15545

Please sign in to comment.