URLParams returns the Url and Query parameters from the request url.
(r *http.Request)
| 142 | |
| 143 | // URLParams returns the Url and Query parameters from the request url. |
| 144 | func URLParams(r *http.Request) map[string]string { |
| 145 | qp := r.URL.Query() |
| 146 | result := make(map[string]string) |
| 147 | |
| 148 | for key, values := range qp { |
| 149 | result[key] = strings.Join(values, ", ") |
| 150 | } |
| 151 | |
| 152 | return result |
| 153 | } |
| 154 | |
| 155 | // ToYamlHTTPHeader converts the http header into yaml format |
| 156 | func ToYamlHTTPHeader(httpHeader http.Header) map[string]string { |
no outgoing calls
no test coverage detected