NewGetOtherRequest generates requests for GetOther
(server string)
| 440 | |
| 441 | // NewGetOtherRequest generates requests for GetOther |
| 442 | func NewGetOtherRequest(server string) (*http.Request, error) { |
| 443 | var err error |
| 444 | |
| 445 | serverURL, err := url.Parse(server) |
| 446 | if err != nil { |
| 447 | return nil, err |
| 448 | } |
| 449 | |
| 450 | operationPath := fmt.Sprintf("/with_other_response") |
| 451 | if operationPath[0] == '/' { |
| 452 | operationPath = "." + operationPath |
| 453 | } |
| 454 | |
| 455 | queryURL, err := serverURL.Parse(operationPath) |
| 456 | if err != nil { |
| 457 | return nil, err |
| 458 | } |
| 459 | |
| 460 | req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil) |
| 461 | if err != nil { |
| 462 | return nil, err |
| 463 | } |
| 464 | |
| 465 | return req, nil |
| 466 | } |
| 467 | |
| 468 | // NewGetJsonWithTrailingSlashRequest generates requests for GetJsonWithTrailingSlash |
| 469 | func NewGetJsonWithTrailingSlashRequest(server string) (*http.Request, error) { |