mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Request: Add additional method support for auth/unauth requests
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user