package main import ( "fmt" "io" "net/http" ) func main() { resp, _ := http.Get("https://androiddrew.github.io/") resp_code := resp.StatusCode fmt.Println("Status code:", resp_code) body, _ := io.ReadAll(resp.Body) resp.Body.Close() // prevent memory leak fmt.Println(string(body)) // resp_body, _ := resp_ptr.Body.Read(resp_ptr.) // fmt.Println("Body:", string(resp_body)) // resp_ptr.Body.Close() }