NewPostBothRequest calls the generic PostBoth builder with application/json body
(server string, body PostBothJSONRequestBody)
| 277 | |
| 278 | // NewPostBothRequest calls the generic PostBoth builder with application/json body |
| 279 | func NewPostBothRequest(server string, body PostBothJSONRequestBody) (*http.Request, error) { |
| 280 | var bodyReader io.Reader |
| 281 | buf, err := json.Marshal(body) |
| 282 | if err != nil { |
| 283 | return nil, err |
| 284 | } |
| 285 | bodyReader = bytes.NewReader(buf) |
| 286 | return NewPostBothRequestWithBody(server, "application/json", bodyReader) |
| 287 | } |
| 288 | |
| 289 | // NewPostBothRequestWithBody generates requests for PostBoth with any type of body |
| 290 | func NewPostBothRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { |
no test coverage detected
searching dependent graphs…