cortado

command module
v0.0.0-...-a92ae31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2014 License: MIT Imports: 12 Imported by: 0

README

Cortado

A URL shortener written in Go and base on the Traffic Web Framework.

$ 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"}
$ 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

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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL