#go-http-interface
Simple Go program which demonstrate making HTTP request call against an API endpoint and also handling the request's response.
-
Ensure that you have setup GoLang in your machine.
-
Ensure that you have setup
$GOPATH
environment variable. Refer to this if you have not setup it. -
Run this command to get this source code:
go get github.com/wendysanarwanto/go-http-interface
. The source code will be placed in$GOPATH/src/github.com/wendysanarwanto/go-http-interface
directory. -
Build the source code by running this command:
go build -o $GOPATH/bin/go-http-interface github.com/wendysanarwanto/go-http-interface
. After running the comand, the compiled binary file will be placed inside$GOPATH/bin
path. -
Run the compiled binary by running this command:
go-http-interface