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.

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 communications technology and marketing experts focused on the health sector.

    Our deep knowledge of digital and traditional channels enables us to craft your interfaces, information and messages efficiently and effectively, whether for use within your organisation or out to your customers and external stakeholders.

    We engage people with video, with websites and with database interfaces. And wherever appropriate, we link them all together to make the sum work more effectively than the parts.