Simple JavaScript HTTP resource wrapper