Important to say, this is a learning project to understand GoLang principles and practice.
Download the project and start the server
go run main.go
Perform a POST request
curl --location --request POST 'http://localhost:8080/encode' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "http://www.google.com.br"
}'
return must be something like
{
"redirect_url": "http://localhost:8080/go/xcjHoW17"
}
now you can access your local browser http://localhost:8080/go/xcjHoW17
- Statistics for how many stored urls and redirects performed