This is a simple project that provides functionality to shorten URLs. It exposes two main endpoints:
POST http://localhost:8000/createurl
: This endpoint creates a new short URL. It accepts a JSON body with two properties:shortUrl
, which is the desired short URL, andurl
, which is the original URL that should be shortened.
# @method POST
# @path http://localhost:8000/createurl
# @header:
{
"content-type": "application/json"
}
# @body:
{
"shortUrl": "hello",
"url": "https://google.com"
}
GET http://localhost:8000/hello
: This endpoint retrieves the URL associated with the provided short URL in the parameter.
# @method: GET
# @path: http://localhost:8000/hello3
# @header:
{
"content-type": "application/json"
}
GET http://localhost:8000/shorturl/all
: This endpoint retrieves all data.
# @method: GET
# @path: http://localhost:8000/shorturl/all
# @header:
{
"content-type": "application/json"
}
If you want to contribute to this project, follow the steps below:
- Fork the project.
- Create a Branch for your Feature (
git checkout -b feature/AmazingFeature
). - Add your changes (
git add .
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push the Branch (
git push origin feature/AmazingFeature
). - Open a Pull Request.
Distributed under the MIT License. See LICENSE for more information.