Changed all RCurl library calls to use httr library calls