MCPcopy
hub / github.com/syncthing/syncthing / responseToBArray

Function responseToBArray

cmd/syncthing/cli/utils.go:22–28  ·  view source on GitHub ↗
(response *http.Response)

Source from the content-addressed store, hash-verified

20)
21
22func responseToBArray(response *http.Response) ([]byte, error) {
23 bytes, err := io.ReadAll(response.Body)
24 if err != nil {
25 return nil, err
26 }
27 return bytes, response.Body.Close()
28}
29
30func emptyPost(url string, apiClientFactory *apiClientFactory) error {
31 client, err := apiClientFactory.getClient()

Callers 7

saveToFileFunction · 0.85
getConfigFunction · 0.85
prettyPrintResponseFunction · 0.85
RunMethod · 0.85
configAfterMethod · 0.85
RunMethod · 0.85
checkResponseFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected