resp, err := http.Get("https://example.com/") if err != nil { log.Fatal(err) } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) }In this example, we use the `http.Get` function to make a GET request to the URL `https://example.com/`. We then use the `resp.Body` to read the response body and store it in a `[]byte`. Finally, we close the response body and check for any errors that occurred during the request. Example 2: Adding headers to the request ``` req, err := http.NewRequest("GET", "https://example.com/", nil) if err != nil { log.Fatal(err) } req.Header.Add("X-Custom-Header", "foo") resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) } ``` In this example, we create a new `http.Request` object using the `http.NewRequest` function. We then add a custom header to the request using the `Add` method on the `Header` struct. Finally, we use the `http.DefaultClient.Do` method to make the request, passing in our custom request object. We then read the response body and check for any errors that occurred during the request. The package library used in these examples is the `net/http` package.