MCPcopy
hub / github.com/syncthing/syncthing / Endpoint

Method Endpoint

cmd/syncthing/cli/client.go:105–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103}
104
105func (c *apiClient) Endpoint() string {
106 if c.cfg.Network() == "unix" {
107 return "http://unix/"
108 }
109 url := c.cfg.URL()
110 if !strings.HasSuffix(url, "/") {
111 url += "/"
112 }
113 return url
114}
115
116func (c *apiClient) Do(req *http.Request) (*http.Response, error) {
117 req.Header.Set("X-Api-Key", c.apikey)

Callers 1

RequestMethod · 0.95

Calls 2

URLMethod · 0.80
NetworkMethod · 0.45

Tested by

no test coverage detected