MCPcopy Index your code
hub / github.com/oapi-codegen/oapi-codegen / PostJsonWithBody

Method PostJsonWithBody

internal/test/client/client.gen.go:182–192  ·  view source on GitHub ↗
(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn)

Source from the content-addressed store, hash-verified

180}
181
182func (c *Client) PostJsonWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
183 req, err := NewPostJsonRequestWithBody(c.Server, contentType, body)
184 if err != nil {
185 return nil, err
186 }
187 req = req.WithContext(ctx)
188 if err := c.applyEditors(ctx, req, reqEditors); err != nil {
189 return nil, err
190 }
191 return c.Client.Do(req)
192}
193
194func (c *Client) PostJson(ctx context.Context, body PostJsonJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
195 req, err := NewPostJsonRequest(c.Server, body)

Callers

nothing calls this directly

Calls 3

applyEditorsMethod · 0.95
DoMethod · 0.65

Tested by

no test coverage detected