mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 15:10:59 +00:00
Add httputil.DumpRequestOut & httputil.DumpResponse to SendPayload (#298)
* First pass adding DumpResponse * WIP * Added httpDebug flag to SendPayload * anx -> coinbase converted * HTTPDebug flag added to all exchanges * Updated Alphapoint: * reworded error message * Corrected itbit and huobihadax sendpayload * Removed setting of default value * don't return body for response as we already get this in verbose mode * body is now included based on verbose setting * WIP * Due to issues with DumpResponse and gzip decoding use raw response from exchange for body output Also adds gzip decoding back as bug fix for OK group exchange * removed additional new line * Added URL path to dumpbody display as well
This commit is contained in:
@@ -115,6 +115,7 @@ func (o *OKGroup) Setup(exch *config.ExchangeConfig) {
|
||||
o.SetHTTPClientUserAgent(exch.HTTPUserAgent)
|
||||
o.RESTPollingDelay = exch.RESTPollingDelay
|
||||
o.Verbose = exch.Verbose
|
||||
o.HTTPDebugging = exch.HTTPDebugging
|
||||
o.Websocket.SetWsStatusAndConnection(exch.Websocket)
|
||||
o.BaseCurrencies = exch.BaseCurrencies
|
||||
o.AvailablePairs = exch.AvailablePairs
|
||||
@@ -623,7 +624,7 @@ func (o *OKGroup) SendHTTPRequest(httpMethod, requestType, requestPath string, d
|
||||
|
||||
errCap := errCapFormat{}
|
||||
errCap.Result = true
|
||||
err = o.SendPayload(strings.ToUpper(httpMethod), path, headers, bytes.NewBuffer(payload), &intermediary, authenticated, false, o.Verbose)
|
||||
err = o.SendPayload(strings.ToUpper(httpMethod), path, headers, bytes.NewBuffer(payload), &intermediary, authenticated, false, o.Verbose, o.HTTPDebugging)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user