mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 07:26:47 +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:
@@ -129,6 +129,7 @@ func (b *Bitfinex) Setup(exch *config.ExchangeConfig) {
|
||||
b.SetHTTPClientUserAgent(exch.HTTPUserAgent)
|
||||
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
|
||||
@@ -1001,7 +1002,7 @@ func (b *Bitfinex) CloseMarginFunding(swapID int64) (Offer, error) {
|
||||
|
||||
// SendHTTPRequest sends an unauthenticated request
|
||||
func (b *Bitfinex) SendHTTPRequest(path string, result interface{}, verbose bool) error {
|
||||
return b.SendPayload(http.MethodGet, path, nil, nil, result, false, false, verbose)
|
||||
return b.SendPayload(http.MethodGet, path, nil, nil, result, false, false, verbose, b.HTTPDebugging)
|
||||
}
|
||||
|
||||
// SendAuthenticatedHTTPRequest sends an autheticated http request and json
|
||||
@@ -1046,7 +1047,8 @@ func (b *Bitfinex) SendAuthenticatedHTTPRequest(method, path string, params map[
|
||||
result,
|
||||
true,
|
||||
true,
|
||||
b.Verbose)
|
||||
b.Verbose,
|
||||
b.HTTPDebugging)
|
||||
}
|
||||
|
||||
// GetFee returns an estimate of fee based on type of transaction
|
||||
|
||||
Reference in New Issue
Block a user