MCPcopy Create free account
hub / github.com/algolia/cli / unmarshalTo

Function unmarshalTo

api/crawler/client.go:141–144  ·  view source on GitHub ↗

unmarshalTo unmarshals an HTTP response body to a given interface.

(r *http.Response, v interface{})

Source from the content-addressed store, hash-verified

139
140// unmarshalTo unmarshals an HTTP response body to a given interface.
141func unmarshalTo(r *http.Response, v interface{}) error {
142 defer r.Body.Close()
143 return json.NewDecoder(r.Body).Decode(v)
144}
145
146// Create creates a new Crawler.
147// It returns the Crawler ID if successful.

Callers 1

requestMethod · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected