Debugging web scripts with the Firefox REST Client

Firebug REST Client

The Firebug REST Client

Because Web Scripts involve two computers talking to each other, they are potentially hard to debug. We’ve found that it pays to test the scripts from a web browser before writing any code. We iron out our exact understanding of what parameters the script needs and what it returns before doing it from within our application. There’s an add-on to Firefox called “REST Client”. You specify the URL, method (PUT, POST, GET) and optionally any request headers and body (for example CMIS XML). The REST Client will then tell you if the request succeeded and you can examine the response.  Take care to specify the correct content type in the header for xml or json.

In the example above you can see the URL, http://epsilon.nuhrise.org/alfresco/service/cmis/i/2c62291d-2e9f-4ac3-83a1-157406ffb2aa/children and the verbose response. In this case the response describes files in the Company Home space.

In the next article we’ll describe the web services our application Documas uses to view, upload and download files from Alfresco and we’ll also cover assigning and accepting/rejecting workflow tasks on documents from our external application.

This entry was posted in Document Management, Open Source, Web Development and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. rajat talwar
    Posted March 1, 2012 at 6:46 am | Permalink

    How can I test an image upload with fireforx rest client plugin.

  2. rajat talwar
    Posted March 1, 2012 at 6:49 am | Permalink

    Found a solution -
    There is this iphone app which does the same thing.

    http://itunes.apple.com/us/app/rest-client/id503860664?ls=1&mt=8

    but I am still looking for the browser image upload for testing rest api.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Welcome to Propheris Limited

    We are a communications technology company focused on the health sector.

    Our deep knowledge of digital channels enable us to craft interfaces and traffic information efficiently and effectively.

    We engage people with with database interfaces, making the sum work more effectively than the parts.