MCPcopy
hub / github.com/syncthing/syncthing / Request

Method Request

cmd/syncthing/cli/client.go:125–131  ·  view source on GitHub ↗
(url, method string, r io.Reader)

Source from the content-addressed store, hash-verified

123}
124
125func (c *apiClient) Request(url, method string, r io.Reader) (*http.Response, error) {
126 request, err := http.NewRequest(method, c.Endpoint()+"rest/"+url, r)
127 if err != nil {
128 return nil, err
129 }
130 return c.Do(request)
131}
132
133func (c *apiClient) RequestString(url, method, data string) (*http.Response, error) {
134 return c.Request(url, method, bytes.NewBufferString(data))

Callers 2

RequestStringMethod · 0.95
RequestJSONMethod · 0.95

Calls 2

EndpointMethod · 0.95
DoMethod · 0.95

Tested by

no test coverage detected