MCPcopy
hub / github.com/syncthing/syncthing / PostConfig

Method PostConfig

lib/rc/rc.go:284–291  ·  view source on GitHub ↗
(cfg config.Configuration)

Source from the content-addressed store, hash-verified

282}
283
284func (p *Process) PostConfig(cfg config.Configuration) error {
285 buf := new(bytes.Buffer)
286 if err := json.NewEncoder(buf).Encode(cfg); err != nil {
287 return err
288 }
289 _, err := p.Post("/rest/system/config", buf)
290 return err
291}
292
293func (p *Process) PauseDevice(dev protocol.DeviceID) error {
294 _, err := p.Post("/rest/system/pause?device="+dev.String(), nil)

Callers 1

Calls 1

PostMethod · 0.95

Tested by 1