Essentially a shitty cURL CLI implementation in Go which basically simulates HTTP requests. I wrote this in order to familiarize myself with Go, as well as to refresh myself on networking concepts.
Clone this repository:
git clone https://github.com/bjma/gurl.git
cd gurl
go install
Run the Makefile using make
to compile the executable. Then, simply run gurl
like the following:
./gurl -url [URL] [OPTIONS]
To run the project globally, you can create an alias in your .bash_profile
:
# ~/.bash_profile
alias gurl="/path/to/project/gurl -url "
Then, you can run it like so:
gurl [URL] [OPTIONS]
url
- Specify URL (defaulted toargv[1]
)X
- Specify METHOD (defaulted toGET
)d
- Read data from astring
or file prefixed by@
TODOo
- Write output to file (defaulted tostdout
)H
- Set headers
- Suppress header outputv
- Debuggingi
- Show response header