JSON - JavaScript Object Notation
Submitting a URL to be shortened
http://x.bardo.ws/api/new.json?url=LONG URL HERE
Output
|
{"code":"http://x.bardo.ws?1","error":""} |
{"code":"Invalid Protocol","error":"error"} |
{"code":"","error":"Shortening this URL is not permitted."} |
Plain Text - .txt Format
Submitting a URL to be shortened
http://x.bardo.ws/api/new.txt?url=LONG URL HERE
Output
|
code:http://x.bardo.ws?1
error:
|
code:Invalid Protocol
error:error
|
code:
error:Shortening this URL is not permitted.
|
Completely Plain - Just the result
Submitting a URL to be shortened
http://x.bardo.ws/api/new?url=LONG URL HERE
Output
Invalid Protocol |
Shortening this URL is not permitted. |
XML - Extensible Markup Language
Submitting a URL to be shortened
http://x.bardo.ws/api/new.xml?url=LONG URL HERE
Output
|
<?xml version="1.0" encoding="UTF-8"?>
<shorturl>
<code>http://x.bardo.ws?1</code>
<href>http://www.google.com</href>
<error> </error>
</shorturl>
|
<?xml version="1.0" encoding="UTF-8"?>
<shorturl>
<code> Invalid Protocol</code>
<error>error</error>
</shorturl>
|
<?xml version="1.0" encoding="UTF-8"?>
<shorturl>
<code> </code>
<error>Shortening this URL is not permitted.</error>
</shorturl>
|