Simple Tabs w/ CSS & jQuery

JSON - JavaScript Object Notation

Submitting a URL to be shortened

http://uyrl.net/api/new.json?url=LONG URL HERE


Output

  • If no error
{"code":"http://uyrl.net/l/1","error":""}
  • If there is an 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://uyrl.net/api/new.txt?url=LONG URL HERE


Output

  • If no error
code:http://uyrl.net/l/1 
error:
        
  • If there is an 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://uyrl.net/api/new?url=LONG URL HERE


Output

  • If no error
http://uyrl.net/l/1
  • If there is an error
Invalid Protocol
Shortening this URL is not permitted.

XML - Extensible Markup Language

Submitting a URL to be shortened

http://uyrl.net/api/new.xml?url=LONG URL HERE


Output

  • If no error
<?xml version="1.0" encoding="UTF-8"?>
<shorturl>
<code>http://uyrl.net/l/1</code>
<href>http://www.google.com</href>
<error> </error>
</shorturl>
  • If there is an error
<?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>
API :: uyrl.net - Url shorter