123456789101112131415161718192021222324 |
- /*
- The Kurz Web API exposes these routes:
- - GET "/<short>" : resolve a short URL
- - Handler: HandleGetShort()
- - Success: 307 to matching target URL
- - Client request incorrect: 400
- - Short not yet defined: 404 no matching target
- - Target blocked for permission reasons: 403
- - Target legally censored: 451
- - Server failure: 50*
- - POST "/" with <target>: create a short URL from a target URL
- - Handler: HandlePostTarget()
- - Success: 201 with <new short>
- - Already existing short: 409 with <existing short>
- - Target blocked for permission reasons: 403
- - Target legally censored: 451
- - Server failure: 50*
- Code 451 MAY be replaced by 403, for example when legal censorship includes a
- gag order, super-injunction (UK), National security letter (US) or similar
- mechanisms.
- */
- package api
|