This will be your first task. Explore how Moodle and write your findings in a report. You’ll be using the browser developer tools to make the network report. In your report, write about
Finally, create a file in this repo as backend/week1/report.md
and write your findings, make sure to insert screenshots wherever you can!
telnet
/nc
, curl
, wget
and learn how to make requests to these serversIn this task you have to make a URL shortner using Python simple HTTP server. The following should be the features of your URL shortner:
A redirect endpoint which takes a shortened URL and redirects to the original URL.
GET /redirect/<short_code
should return a response with header HTTP 302 Found
A create endpoint which takes a URL and returns a shortened URL.
POST /create/<short_code>/<destination_url>
should return a response with header HTTP 201 Created
We would recommend you to initially start with setting up a simple server which can return any arbitrary header and content for a given URL. Later, set up a database where you can write queries
Finally, put your source file in this repo as backend/week1/server.py
Add the following features to your URL shortner:
PATCH
endpoint to update the destination for a link. How can you ensure that only the user who created that shortlink is able to edit it?