Skip to content

tahakaganu/urlshortening

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

urlshortening

URL Shortening solution

To execute the solution from the terminal:

curl -i -H "Content-Type: application/json" -X POST -d '{"url": "<URL_TO_BE_ENCODED>"}' http://localhost:80/

To use the API simply do a POST request to the flask container. The POST data must follow the format {"url": "<URL_TO_BE_ENCODED>"} The api will return {"new_url": "<NEW_SHORTEN_URL">}

You can call the NEW_SHORTEN_URL and the application will redirect you to the original URL. If the URL does not exist in the database, the API will return an error message {"message": "URL does not exists."}

About

URL Shortening solution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages