Changed to use HTTP stream and moved user-agent to parameter