(status int, body string)
| 154 | } |
| 155 | |
| 156 | func StatusStringResponse(status int, body string) Responder { |
| 157 | return func(req *http.Request) (*http.Response, error) { |
| 158 | return httpResponse(status, req, bytes.NewBufferString(body)), nil |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | func JSONResponse(body interface{}) Responder { |
| 163 | return func(req *http.Request) (*http.Response, error) { |