Replaces direct RCurl calls with httr calls.