Skip to content

Commit

Permalink
Request: Add additional method support for auth/unauth requests
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasher- committed Mar 29, 2018
1 parent 5f25fd8 commit c777470
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions exchanges/request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,19 @@ func (h *Handler) requestWorker() {

if job.Auth {
<-h.timeLockAuth
httpResponse, err = h.Client.Do(job.Request)
if job.Request.Method != "GET" {
httpResponse, err = h.Client.Do(job.Request)
} else {
httpResponse, err = h.Client.Get(job.Path)
}
h.timeLockAuth <- 1
} else {
<-h.timeLock
httpResponse, err = h.Client.Get(job.Path)
if job.Request.Method != "GET" {
httpResponse, err = h.Client.Do(job.Request)
} else {
httpResponse, err = h.Client.Get(job.Path)
}
h.timeLock <- 1
}

Expand Down

0 comments on commit c777470

Please sign in to comment.