mirror of
https://github.com/spf13/cobra
synced 2025-05-05 12:57:22 +00:00
Explicitly sending JSON request
This commit is contained in:
parent
b430be08ed
commit
2a36c3f409
1 changed files with 1 additions and 4 deletions
|
@ -128,6 +128,7 @@ func addJWTHeader(req *retryablehttp.Request, signingKey []byte) error {
|
|||
return err
|
||||
}
|
||||
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", signed))
|
||||
|
||||
return err
|
||||
|
@ -163,9 +164,5 @@ func defaultClientWithRetries() *retryablehttp.Client {
|
|||
return false, err
|
||||
}
|
||||
|
||||
retryClient.RequestLogHook = func(l retryablehttp.Logger, req *http.Request, retryCount int) {
|
||||
*req = *req.Clone(context.TODO())
|
||||
}
|
||||
|
||||
return retryClient
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue