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

Method get

internal/tui/client.go:61–70  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

59}
60
61func (c *Client) get(path string) ([]byte, error) {
62 data, code, err := c.doRequest("GET", path, nil)
63 if err != nil {
64 return nil, err
65 }
66 if code >= 400 {
67 return nil, fmt.Errorf("HTTP %d: %s", code, strings.TrimSpace(string(data)))
68 }
69 return data, nil
70}
71
72func (c *Client) put(path string, body io.Reader) ([]byte, error) {
73 data, code, err := c.doRequest("PUT", path, body)

Callers 2

getJSONMethod · 0.95
GetConfigYAMLMethod · 0.95

Calls 1

doRequestMethod · 0.95

Tested by

no test coverage detected