A Go implementation of an HTTP Getter with fully self-implemented URL parsing, DNS resolution and HTTP GET request and response parsing using only transport layer APIs.
- HTTP/HTTPS scheme with default or custom port
- Concurrent DNS resolution for both IPv4 and IPv6 addresses
- HTTP 1.1 GET request and response parsing
- HTTP redirect following with cookie handled
- Chunked HTTP response body supported
- HTTP response body with gzip encoding supported
- Multi-thread downloading large response bodies
- Clone the git repository to your
$GOPATH
- Modify the
import
in goget.go to match the absolute path of thegonet
package in your$GOPATH
- Run the following command:
go install GoGET/goget
- Get the executable goget in your
$GOPATH/bin
goget accept only one argument, the URL:
goget http://www.test.com
If there is no error, goget will print the received HTTP response body result to stdout
. It will also print the resolved IP address and HTTP request/response header in stderr
.
If anything goes wrong, goget will leave stdout
empty and send error message to stderr
.
- Go's native TLS library
- Go's native gzip library