API Design
In the API design there are two major endpoints (following REST architecture to create these endpoints) involved which are ->
- accepts longUrl and returns short url (POST REQUEST) -> if longUrl already exists return short url
- accepts short url and returns long url (GET REQUEST) -> status code 301, 302 is returned with the location for redirection