mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 15:10:40 +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:
@@ -82,6 +82,7 @@ func (e *EXMO) Setup(exch *config.ExchangeConfig) {
|
||||
e.SetEnabled(false)
|
||||
} else {
|
||||
e.Enabled = true
|
||||
e.HTTPDebugging = exch.HTTPDebugging
|
||||
e.AuthenticatedAPISupport = exch.AuthenticatedAPISupport
|
||||
e.SetAPIKeys(exch.APIKey, exch.APISecret, "", false)
|
||||
e.SetHTTPClientTimeout(exch.HTTPTimeout)
|
||||
@@ -371,7 +372,7 @@ func (e *EXMO) GetWalletHistory(date int64) (WalletHistory, error) {
|
||||
|
||||
// SendHTTPRequest sends an unauthenticated HTTP request
|
||||
func (e *EXMO) SendHTTPRequest(path string, result interface{}) error {
|
||||
return e.SendPayload(http.MethodGet, path, nil, nil, result, false, false, e.Verbose)
|
||||
return e.SendPayload(http.MethodGet, path, nil, nil, result, false, false, e.Verbose, e.HTTPDebugging)
|
||||
}
|
||||
|
||||
// SendAuthenticatedHTTPRequest sends an authenticated HTTP request
|
||||
@@ -410,7 +411,8 @@ func (e *EXMO) SendAuthenticatedHTTPRequest(method, endpoint string, vals url.Va
|
||||
result,
|
||||
true,
|
||||
true,
|
||||
e.Verbose)
|
||||
e.Verbose,
|
||||
e.HTTPDebugging)
|
||||
}
|
||||
|
||||
// GetFee returns an estimate of fee based on type of transaction
|
||||
|
||||
Reference in New Issue
Block a user