- I can pass a URL as a parameter and I will receive a shortened URL in the JSON response.
- If I pass an invalid URL that doesn't follow the valid
http://www.example.com
format, the JSON response will contain an error instead.- When I visit that shortened URL, it will redirect me to my original link.
https://shorturl-hemakshis.herokuapp.com/new/https://www.facebook.com
https://shorturl-hemakshis.herokuapp.com/new/https://www.gmail.com
{"originalURL": "https://www.facebook.com", "shortURL": "https://shorturl-hemakshis.herokuapp.com/4338"}
{"originalURL": "https://www.gmail.com", "shortURL": "https://shorturl-hemakshis.herokuapp.com/9944"}
https://shorturl-hemakshis.herokuapp.com/7599
https://www.google.com