FLVio FLVio
Sign up | Sign in

FLVio MediaKit - API Debugging Tips

Overview

FLVio MediaKit offers a RESTful HTTP API, taking advantage of open Internet standards that are very well known and hence can be accessed by a huge variety of existing tools, applications and libraries.

One of the easiest ways to debug & test a RESTful HTTP API is simply to use a web browser. This documents describes how to use a web browser for debugging the FLVio MediaKit API.

Debugging with a web browser

The FLVio MediaKit API uses the HTTP protocol and delivers resource representations in XHTML format. It is no coincidence that these technologies are also the standard building blocks of Internet web sites and are thus supported by all web browsers.

The API URI representing all media items in your FLVio account is:

https://mediakit.flvio.com/api/v1/media

which returns a representation as XHTML for GET requests. If you are tempted to paste this address into your web browser, then go to the head of the class. Web browsers will perform a GET request by default, will automatically prompt you for authentication details, and so make a perfect debugging tool for viewing representations of GET requests.

By using a web browser to fetch an API resource you can verify that your account is working correctly and you can also see the actual representation of your resource, so you know what to expect. Web browsers will render the XHTML as readable text but you can use the "View Source" option to see the actual XHTML code that your application would receive.

Debugging non-GET requests

Unfortunately, it is not easy to force most web browsers to make a HTTP call that is not a GET request. Fortunately, some web browsers support plugins which can help here.

For Firefox users, the Poster plugin is very useful when testing & debugging the FLVio MediaKit API. It installs a Firefox sidebar that allows you to customise the HTTP request. In particular, you can make PUT, DELETE, and POST calls.

Install the Poster plugin for Firefox then enable the Poster sidebar in the View/Sidebars menu. Using the Poster sidebar you can:

  • Choose the HTTP action (GET, PUT, POST, DELETE, etc)
  • Select a file to upload (for testing media upload with PUT)
  • Customise the request headers

Firefox and the Poster plugin make a very practical debugging tool for RESTful HTTP APIs and the FLVio MediaKit API in particular.


Updated:2008-08-27
Version:1.0.0
Copyright:Locayta LTD 2008. All rights reserved.