MCPcopy Create free account
hub / github.com/AdRoll/baker / httpGet

Function httpGet

input/list.go:432–442  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

430}
431
432func httpGet(url string) (*http.Response, error) {
433 res, err := http.Get(url)
434 if err != nil {
435 return nil, err
436 }
437 if res.StatusCode != http.StatusOK {
438 res.Body.Close()
439 return nil, fmt.Errorf("error file %q return %d code", url, res.StatusCode)
440 }
441 return res, nil
442}

Callers 2

openFileMethod · 0.85
processListMethod · 0.85

Calls 2

GetMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected