mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-24 22:23:02 +00:00
Improve debug curl command
Kubernetes-commit: 42f756aeb01a6ce90ff56a0b07cb4bb5ab2c602b
This commit is contained in:
parent
e50cb60ce9
commit
c1e13e8dbf
@ -331,11 +331,11 @@ func (r *requestInfo) toCurl() string {
|
||||
headers := ""
|
||||
for key, values := range r.RequestHeaders {
|
||||
for _, value := range values {
|
||||
headers += fmt.Sprintf(` -H %q`, fmt.Sprintf("%s: %s", key, value))
|
||||
headers += fmt.Sprintf(` -H %q`, fmt.Sprintf("%s: '%s'", key, value))
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("curl -k -v -X%s %s %s", r.RequestVerb, headers, r.RequestURL)
|
||||
return fmt.Sprintf("curl -k -v -X%s %s '%s'", r.RequestVerb, headers, r.RequestURL)
|
||||
}
|
||||
|
||||
// debuggingRoundTripper will display information about the requests passing
|
||||
|
Loading…
Reference in New Issue
Block a user