This is a GO program that makes a request to the URL that user provided using sockets directly instead of a library that handles the HTTP/HTTPS request.
To create a binary executable file, use the following command line:
go build getURL.go
The above command will create a binary executable file getURL
in the current directory, then you can execute it the following command line:
./getURL --url <your_url>
Or use go run getURL.go
without building it.
./getURL --url <URL>
It takes an required argument that is a full URL following --url
.
It will make an HTTP/HTTPS request to URL
and print the response directly to the console.
If no protocal specified, by default, it will send an HTTPS request.
./getURL --url <URL> --profile <N>
--profile
takes a positive integer N
.
It will make N
requests to the provided URL
, time the requests and then print the following results:
- The number of requests
- The fastest time
- The slowest time
- The mean & median times
- The percentage of requests that succeeded
- Any error codes returned that weren't a success
- The size in bytes of the smallest response
- The size in bytes of the largest response
./getURL --help
It allows a --help parameter that describes how to use it.
Here are some screenshots of this tool run against different websites.