REST API to shorten Urls
- Spring Boot for creating the RESTful Web Services
- MockMVC for testing the Web Layer
- Mockito for testing the Services Layer
- MySQL as database
- Gradle for managing the project's build
Request Method | URI | Body (JSON) | Description |
---|---|---|---|
GET | http://localhost:8081/ur2lng/{id} | - | Get long url that has been previously created using POST endpoint and redirect |
POST | http://localhost:8081/ur2lng | { "longUrl": "[http...]" } | Create a short Url from a long Url and return short Url resource location in HTTP headers |