manta-shortener
is a URL shortening service, optionally backed by Manta.
Get a short link.
Field | Type | Description |
---|---|---|
url | string | URL target |
GET /s?url=https://www.joyent.com/
{
"url": "https://www.joyent.com/",
"link": "http://localhost:8080/8553696207"
}
POST /
-d url=https://www.joyent.com/
{
"url": "https://www.joyent.com/",
"link": "http://localhost:8080/8553696207"
}
Redirect short URL to URL target
Field | Type | Description |
---|---|---|
key | number | short url |
GET /8553696207
HTTP/1.1 302 Found
Location: https://www.joyent.com/
Retrieve target URL without redirection.
Field | Type | Description |
---|---|---|
key | number | short url |
preview | boolean | Must be set true to preview |
GET /8553696207?preview=true
HTTP/1.1 200 OK
{
"location": "https://www.joyent.com/"
}