js wrapper for requests