Web service fetch a file from a URL and return it wrapped in a call to a given JS function