package main import ( "bufio" "fmt" "io/ioutil" "net/http" "os" "strings" ) func main() { reader := bufio.NewReader(os.Stdin) fmt.Print("Enter request URL: ") url, err := reader.ReadString('\n') if err != nil { fmt.Println("Error:", err) return } url = strings.TrimSpace(url) response, err := http.Get(url) if err != nil { fmt.Println("Error:", err) return } defer response.Body.Close() body, err := ioutil.ReadAll(response.Body) if err != nil { fmt.Println("Error:", err) return } fmt.Println(string(body)) }