https://github.com/gravityblast/cortado
A URL shortener written in Go and base on Traffic.
https://github.com/gravityblast/cortado
Last synced: 7 months ago
JSON representation
A URL shortener written in Go and base on Traffic.
- Host: GitHub
- URL: https://github.com/gravityblast/cortado
- Owner: gravityblast
- License: mit
- Created: 2013-12-14T20:08:48.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-11-19T02:33:43.000Z (over 11 years ago)
- Last Synced: 2025-01-05T22:41:47.609Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 156 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cortado
A URL shortener written in Go and base on the [Traffic Web Framework](https://github.com/pilu/traffic).
```bash
$ curl -XPOST -i http://localhost:7000/ -d "url=http://gravityblast.com"
HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Cortado-Version: 0.1.0
Location: http://localhost:7000/1
{"long_url":"http://gravityblast.com","short_url":"http://localhost:7000/1","shorty":"1"}
```
```bash
$ curl -i http://localhost:7000/1
HTTP/1.1 301 Moved Permanently
Content-Type: application/json; charset=utf-8
Cortado-Version: 0.1.0
Location: http://gravityblast.com
```
```bash
curl -i http://localhost:7000/1+
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cortado-Version: 0.1.0
{"clicks":"30","long_url":"http://gravityblast.com","short_url":"http://localhost:7000/1","shorty":"1"}
```
## Author
* [Andrea Franz](http://gravityblast.com)