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

Function NewGetBothRequest

internal/test/client/client.gen.go:319–343  ·  view source on GitHub ↗

NewGetBothRequest generates requests for GetBoth

(server string)

Source from the content-addressed store, hash-verified

317
318// NewGetBothRequest generates requests for GetBoth
319func NewGetBothRequest(server string) (*http.Request, error) {
320 var err error
321
322 serverURL, err := url.Parse(server)
323 if err != nil {
324 return nil, err
325 }
326
327 operationPath := fmt.Sprintf("/with_both_responses")
328 if operationPath[0] == '/' {
329 operationPath = "." + operationPath
330 }
331
332 queryURL, err := serverURL.Parse(operationPath)
333 if err != nil {
334 return nil, err
335 }
336
337 req, err := http.NewRequest(http.MethodGet, queryURL.String(), nil)
338 if err != nil {
339 return nil, err
340 }
341
342 return req, nil
343}
344
345// NewPostJsonRequest calls the generic PostJson builder with application/json body
346func NewPostJsonRequest(server string, body PostJsonJSONRequestBody) (*http.Request, error) {

Callers 1

GetBothMethod · 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…