(body string)
| 32 | } |
| 33 | |
| 34 | func StringResponse(body string) Responder { |
| 35 | return func(req *http.Request) (*http.Response, error) { |
| 36 | return httpResponse(200, req, bytes.NewBufferString(body)), nil |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func JSONResponse(body interface{}) Responder { |
| 41 | return func(req *http.Request) (*http.Response, error) { |