mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-13 02:23:51 +00:00
maxapi: fix dump request error check
This commit is contained in:
parent
48c84824cf
commit
16e5e08d58
|
@ -269,12 +269,12 @@ func (c *RestClient) newAuthenticatedRequest(m string, refURL string, data inter
|
||||||
req.Header.Add("X-MAX-SIGNATURE", signPayload(encoded, c.APISecret))
|
req.Header.Add("X-MAX-SIGNATURE", signPayload(encoded, c.APISecret))
|
||||||
|
|
||||||
if debugRequestDump {
|
if debugRequestDump {
|
||||||
dump, err := httputil.DumpRequestOut(req, true)
|
dump, err2 := httputil.DumpRequestOut(req, true)
|
||||||
if err != nil {
|
if err2 != nil {
|
||||||
log.Panic(err)
|
log.Errorf("dump request error: %v", err2)
|
||||||
|
} else {
|
||||||
|
fmt.Printf("REQUEST:\n%s", dump)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("REQUEST:\n%s", dump)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return req, nil
|
return req, nil
|
||||||
|
|
Loading…
Reference in New Issue
Block a user