Skip to content

jonaslins/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

url-shortener

How to run

  1. mvnw clean package
  2. docker-compose up -d

Endpoints

Shorten Url

POST localhost:8080/
Content-Type: application/json
Body:
{
"originalUrl":"https://github.com/jonaslins/"
}

Response: 200 OK
{
"code": "UqnPBrQ",
"originalUrl":"https://github.com/jonaslins/",
...
}

Redirect to original url

GET localhost:8080/{code}
Response: 302 FOUND
Response Headers:
"Location": "https://github.com/jonaslins/"

Get shorten url statistics

GET localhost:8080/{code}/statistics

Response: 200 OK
{
"originalUrl":"https://github.com/jonaslins/",
"hitCount": "9",
...
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published