This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // StringRoundTripper is a string based http.RoundTripper. | |
| type StringRoundTripper struct { | |
| bodyContent []byte | |
| contentType string | |
| } | |
| func (t *StringRoundTripper) RoundTrip(_ *http.Request) (*http.Response, error) { | |
| // The returned http.Response always has the status http.StatusOK, while the passed http.Request is not used. The | |
| // actual implementation depends of course on the specific purpose. | |
| res := &http.Response{ |