Short Url Microservice

How to use:

Send a POST request containing the url you want to shorten to the following url:[project url]/api/shorturl

NOTE: the provided url need to match the following regex:

/(http|https)://(w+:{0,1}w*@)?(S+)(:[0-9]+)?(/|/([w#!:.?+=&%@!-/]))?/

Example Body:

{"url":"https://robertodilillo.dev"}

Example Response:

{
"original_url":"https://robertodilillo.dev",
"shorturl":"10",
}
Short url can is now available via GET request to the following url:[projectURL]/api/shorturl/10

Try it out