mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
26 lines
523 B
Go
26 lines
523 B
Go
package main
|
|
|
|
import (
|
|
"github.com/foomo/keel/log"
|
|
"github.com/foomo/keel/net/http"
|
|
"github.com/foomo/keel/net/http/roundtripware"
|
|
)
|
|
|
|
func client() {
|
|
l := log.Logger()
|
|
|
|
client := http.NewHTTPClient(
|
|
http.HTTPClientWithRoundTripware(l,
|
|
roundtripware.Logger(),
|
|
),
|
|
)
|
|
|
|
var err error
|
|
|
|
_, err = client.Get("http://localhost:8080") // nolint:noctx
|
|
log.Must(l, err, "failed to retrieve response")
|
|
|
|
_, err = client.Get("http://localhost:8080/404") // nolint:noctx
|
|
log.Must(l, err, "failed to retrieve response")
|
|
}
|