MCPcopy Create free account
hub / github.com/convox/rack / request

Method request

pkg/test/handler_func.go:94–106  ·  view source on GitHub ↗
(method, url string, values url.Values)

Source from the content-addressed store, hash-verified

92}
93
94func (f *HandlerFuncTest) request(method, url string, values url.Values) (req *http.Request, err error) {
95 switch method {
96 case "POST", "PUT":
97 req, err = http.NewRequest(method, url, strings.NewReader(values.Encode()))
98 req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
99 default:
100 req, err = http.NewRequest(method, url+"?"+values.Encode(), nil)
101 }
102
103 req.Header.Set("Version", f.version)
104
105 return
106}
107
108func stripJSON(data []byte) ([]byte, error) {
109 var obj interface{}

Callers 1

RequestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected