MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / patch

Method patch

internal/tui/client.go:83–92  ·  view source on GitHub ↗
(path string, body io.Reader)

Source from the content-addressed store, hash-verified

81}
82
83func (c *Client) patch(path string, body io.Reader) ([]byte, error) {
84 data, code, err := c.doRequest("PATCH", path, body)
85 if err != nil {
86 return nil, err
87 }
88 if code >= 400 {
89 return nil, fmt.Errorf("HTTP %d: %s", code, strings.TrimSpace(string(data)))
90 }
91 return data, nil
92}
93
94// getJSON fetches a path and unmarshals JSON into a generic map.
95func (c *Client) getJSON(path string) (map[string]any, error) {

Callers 4

ToggleAuthFileMethod · 0.95
PatchAuthFileFieldsMethod · 0.95
AddAPIKeyMethod · 0.95
EditAPIKeyMethod · 0.95

Calls 1

doRequestMethod · 0.95

Tested by

no test coverage detected