(body string)
| 122 | } |
| 123 | |
| 124 | func StringResponse(body string) Responder { |
| 125 | return func(req *http.Request) (*http.Response, error) { |
| 126 | return httpResponse(200, req, bytes.NewBufferString(body)), nil |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | func BinaryResponse(body []byte) Responder { |
| 131 | return func(req *http.Request) (*http.Response, error) { |