Commit 42f756ae authored by Aleksandra Malinowska's avatar Aleksandra Malinowska

Improve debug curl command

parent a0844c17
...@@ -331,11 +331,11 @@ func (r *requestInfo) toCurl() string { ...@@ -331,11 +331,11 @@ func (r *requestInfo) toCurl() string {
headers := "" headers := ""
for key, values := range r.RequestHeaders { for key, values := range r.RequestHeaders {
for _, value := range values { 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 // debuggingRoundTripper will display information about the requests passing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment