Convert curl commands to AJAX, Node HTTP, etc