Go-url is an tool to make HTTP requests on command line.
The big differencial are:
go run *.go -config hack/config-sample.json
make build
bin/
dir-config
Read URLs tests from config:
go run *.go -config hack/config-sample.json
-dns
Force to resolve DNS and test on each IP address endpoint
go run *.go -config hack/config-sample.json -dns
-url
Read url from option -url
go run *.go -url https://www.google.com
-header
Supporting header option
go-url -dns -watch-period 20 -watch-interval 2 -header "user-agent=eu" https://www.google.com
or more advanced in config (url item):
{
"url": "https://www.google.com/",
"headers": {
"user-agent": "gurl"
}
},
-watch-*
Add a option to watch requests (repeat requests):
go-url -dns -watch-period 20 -watch-interval 2 https://www.google.com
Read url from argument (argv[1]
)
./bin/go-url https://www.google.com
Run with multiple options:
-dns
and -config
docker run \
-v $PWD/hack/config-sample.json:/config.json \
-i mtulio/go-url:docker \
-dns -config /config.json
docker run \
-v $PWD/hack/config-sample.json:/config.json \
-i mtulio/go-url:docker https://g1.globo.com
make test-run-metrics-stack
-metric
HOSTNAME=MyNode go run *.go \
-dns \
-url=http://www.google.com \
-metric=http://localhost:9091
Open an Issue or PR. =]