mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-31 15:10:42 +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:
@@ -148,6 +148,7 @@ func (b *Bitmex) Setup(exch *config.ExchangeConfig) {
|
||||
b.SetAPIKeys(exch.APIKey, exch.APISecret, "", false)
|
||||
b.RESTPollingDelay = exch.RESTPollingDelay
|
||||
b.Verbose = exch.Verbose
|
||||
b.HTTPDebugging = exch.HTTPDebugging
|
||||
b.Websocket.SetWsStatusAndConnection(exch.Websocket)
|
||||
b.BaseCurrencies = exch.BaseCurrencies
|
||||
b.AvailablePairs = exch.AvailablePairs
|
||||
@@ -850,14 +851,14 @@ func (b *Bitmex) SendHTTPRequest(path string, params Parameter, result interface
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = b.SendPayload(http.MethodGet, encodedPath, nil, nil, &respCheck, false, false, b.Verbose)
|
||||
err = b.SendPayload(http.MethodGet, encodedPath, nil, nil, &respCheck, false, false, b.Verbose, b.HTTPDebugging)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return b.CaptureError(respCheck, result)
|
||||
}
|
||||
}
|
||||
err := b.SendPayload(http.MethodGet, path, nil, nil, &respCheck, false, false, b.Verbose)
|
||||
err := b.SendPayload(http.MethodGet, path, nil, nil, &respCheck, false, false, b.Verbose, b.HTTPDebugging)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -908,7 +909,8 @@ func (b *Bitmex) SendAuthenticatedHTTPRequest(verb, path string, params Paramete
|
||||
&respCheck,
|
||||
true,
|
||||
false,
|
||||
b.Verbose)
|
||||
b.Verbose,
|
||||
b.HTTPDebugging)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user