A URL shortener service built with Golang.
Website: https://thefeij-url-shortener.liara.run
This project is a URL shortener service implemented in Golang. It allows users to shorten long URLs and redirect to the original URLs using the shortened version.
REST APIs for:
- Shorten long URLs
- Redirect to the original URL using the shortened URL
Send a POST request to /links with the URL to be shortened.
Request:
{
"url": "https://www.google.com/search?q=long+url&oq=long+url&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIHCAEQABiABDIJCAIQABgKGIAEMgcIAxAuGIAEMgcIBBAuGIAEMgcIBRAAGIAEMgcIBhAAGIAEMgcIBxAAGIAEMgcICBAAGIAEMgcICRAAGIAE0gEIMTgzNmowajeoAgCwAgA&sourceid=chrome&ie=UTF-8"
}
Response:
{
"short_url": "https://thefeij-url-shortener.liara.run/links/VzT9h5"
}
Access the shortened URL in the browser or via a GET request to be redirected.
- POST /links: Shorten a URL.
- GET /links/:shortUrl: Redirect to the original URL