MCPcopy Create free account
hub / github.com/oapi-codegen/oapi-codegen / NewGetOtherRequest

Function NewGetOtherRequest

internal/test/client/client.gen.go:442–466  ·  view source on GitHub ↗

NewGetOtherRequest generates requests for GetOther

(server string)

Source from the content-addressed store, hash-verified

440
441// NewGetOtherRequest generates requests for GetOther
442func 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
469func NewGetJsonWithTrailingSlashRequest(server string) (*http.Request, error) {

Callers 1

GetOtherMethod · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…