Voxel An Internap Company

Dedicated Hosting

Managed Hosting

Cloud Hosting

Our Technology

About Us

Voxel Blog:
Uptime

From the cooks inside the Voxel kitchen

November

1

Javascript development against key/secret authenticated APIs

Posted by Brian Vaughan

Some of you use hAPI and our hAPI client libraries to manage your
servers, configure CDN services, purge CDN content, monitor your
servers, or even write custom applications to use internally.  When we
build tools such as the Voxel Android App, or web portal, we use the
same client libraries available to you.

When developing hAPI powered websites, a form or AJAX call would
typically need to post to a server-side script.  The server side
language would then use one one of our client libraries to make a hAPI
call.  In our last software release we added a Javascript client
library, which means a hAPI call can be made directly from in-browser
code, without the need for a server side programming language.

Due to cross-domain Javascript restrictions, a web server will typically
still need to proxy Javascript hAPI requests to our hAPI server.  From a
code perspective though, all of the authentication, login, and hAPI
coding can happen on a single interactive non-refreshing web page,
without flash or any other plugins1.

The Javascript client library relies on JQuery, php.js, and persist.js.

See the README file and sample code for more information.  We'd love to
hear any feedback, comments, or suggestions you might have about this
library.


[1] persist.js will fall back on Flash in some older browsers that don't
support other forms of client-side persistence.

Posted in api