From c7774708cd5395a62db4c7c890d55c642d5795f7 Mon Sep 17 00:00:00 2001 From: Adrian Gallagher Date: Thu, 29 Mar 2018 15:46:47 +1100 Subject: [PATCH] Request: Add additional method support for auth/unauth requests --- exchanges/request/request.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/exchanges/request/request.go b/exchanges/request/request.go index 0d12fc6e..fb8b88e1 100644 --- a/exchanges/request/request.go +++ b/exchanges/request/request.go @@ -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 }