Files
doll/cmd/doll/main.go

27 lines
478 B
Go

package main
import (
"context"
"doll/internal/log"
"github.com/carlmjohnson/requests"
)
func main() {
var (
ctx = context.Background()
body string
userAgent = "doll"
url = "http://localhost:8240/"
err error
)
if err = requests.URL(url).UserAgent(userAgent).ToString(&body).Fetch(ctx); err != nil {
log.Fatalf("unable to GET %s: %s", url, err)
}
log.Infof("Response is: %s", body)
}
/* vim: set ft=go noet ai ts=4 sw=4 sts=4: */