Summary: UrlShortener allows users to manage their own short links! Create, edit, and delete short links of your favourite websites!
- Target platform: .NET 6
- Seeded database with one user and three addresses
- Default user credentials:
[email protected]
/guest123
The ASP.NET Core app "UrlShortener" is an app for making short URLs.
- Technologies: C#, ASP.NET Core, Entity Framework Core, ASP.NET Core Identity, NUnit
- The app supports the following operations:
- Home page (view latest created / your own short URls):
/
- View addresses:
/URLAddress/All
- Create a new short URL (URL + short code):
/URLAddress/Add
- Edit addresse:
/URLAddress/Edit/:id
- Delete addresse:
/URLAddress/Delete/:id
- Home page (view latest created / your own short URls):
The following endpoints are supported:
GET /api
- list all API endpointsGET /api/urladdresses
- list all addressesGET /api/urladdresses/count
- returns address countGET /api/urladdresses/search/:keyword
- returns an URL that match the given keywordPOST /api/urladdresses/create
- create a new short URL (send a JSON object in the request body, e.g.{ "URL": "https://www.google.com", "Short Code": "goog" }
)PUT /api/urladdresses/:originalUrl
- edit address by its original URL (send a JSON object in the request body, holding all fields, e.g.{ "URL": "https://www.google.com", "Short Code": "goog" }
)DELETE /api/urladdresses/:id
- delete address byid
POST /api/users/login
- logs in an existing user (send a JSON object in the request body, holding all fields, e.g.{ "email": "[email protected]", "password": "guest123" }
)POST /api/users/register
- registers a new user (send a JSON object in the request body, holding all fields, e.g.{ "email": "[email protected]", "password": "somePassword" }
)