Esempio n. 1
0
func getBody(resp *http.Response) []byte {
	response, err := ioutil.ReadAll(resp.Body)
	logger.ProcessError("Can't get a body of HTTP response", err)
	return response
}
Esempio n. 2
0
func sendRequest(data string) *http.Response {
	resp, err := http.Get(data)
	logger.ProcessError("Can't execute HTTP request", err)
	return resp
}