Converted from FTW to Net::HTTP.