updating curlRequest to allow request url as a parameter