Simple, powerful and efficient link shortener API.
POST /?link=https://www.example.org
Parameter | Type | Description |
---|---|---|
link |
string |
Required. Proper URL String. |
{
"msg": "New shortlink generated.",
"shortlink": "http://localhost:8000/770r9Lg"
}
GET /xDFr8a
{
"msg": "Link fetched from datastore.",
"link": "https://www.example.org"
}
Status Code | Description |
---|---|
200 | OK |
201 | CREATED |
400 | BAD REQUEST |
404 | NOT FOUND |
500 | INTERNAL SERVER ERROR |
$ uvicorn app:api --reload