commit
2512dddb84
@ -16,7 +16,10 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func client() *MgClient {
|
func client() *MgClient {
|
||||||
return New(mgURL, mgToken)
|
c := New(mgURL, mgToken)
|
||||||
|
c.Debug = true
|
||||||
|
|
||||||
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMgClient_TransportChannels(t *testing.T) {
|
func TestMgClient_TransportChannels(t *testing.T) {
|
||||||
|
@ -62,9 +62,7 @@ func makeRequest(reqType, url string, buf io.Reader, c *MgClient) ([]byte, int,
|
|||||||
req.Header.Set("X-Transport-Token", c.Token)
|
req.Header.Set("X-Transport-Token", c.Token)
|
||||||
|
|
||||||
if c.Debug {
|
if c.Debug {
|
||||||
b := new(bytes.Buffer)
|
log.Printf("MG TRANSPORT API Request: %s %s %s %v", reqType, url, c.Token, buf)
|
||||||
b.ReadFrom(buf)
|
|
||||||
log.Printf("MG TRANSPORT API Request: %s %s %s %s", reqType, url, c.Token, b.String())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := c.httpClient.Do(req)
|
resp, err := c.httpClient.Do(req)
|
||||||
|
Loading…
Reference in New Issue
Block a user