mirror of
https://github.com/dnote/dnote
synced 2026-03-14 22:45:50 +01:00
Add debug log to HTTP request (#252)
This commit is contained in:
parent
df4866b4d4
commit
d71abdb150
1 changed files with 3 additions and 0 deletions
|
|
@ -32,6 +32,7 @@ import (
|
|||
|
||||
"github.com/dnote/dnote/pkg/cli/context"
|
||||
"github.com/dnote/dnote/pkg/cli/crypt"
|
||||
"github.com/dnote/dnote/pkg/cli/log"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
@ -83,6 +84,8 @@ func doReq(ctx context.DnoteCtx, method, path, body string, options *requestOpti
|
|||
return nil, errors.Wrap(err, "getting request")
|
||||
}
|
||||
|
||||
log.Debug("HTTP request: %+v\n", req)
|
||||
|
||||
var hc http.Client
|
||||
if options != nil && options.HTTPClient != nil {
|
||||
hc = *options.HTTPClient
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue