709 B
709 B
API Project: URL Shortener Microservice for freeCodeCamp
User Stories
- You should provide your own project, not the example URL.
- You can POST a URL to
/api/shorturl/new
and get a JSON response with the property namesoriginal_url
andshort_url
and the expected values for each. - When you visit
/api/shorturl/<short_url>
, you will be redirected to the original URL. - If you pass an invalid URL that doesn't follow the valid
http://www.example.com
format, the JSON response will contain{ 'error': 'invalid url' }
.