I need to do the following http request with the poco net library :
- Code: Select all
GET /axis-cgi/com/ptz.cgi?camera=1¢er=10,10
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1.1) Gecko/20060601 Firefox/2.0.0.1 (Ubuntu-edgy)
Host: 10.xx.xx.xx
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
Currently, I build my http request as it shown in the poco net sample "httpGet", but I don't know how can I put the user agent with poco classes.
(...)
- Code: Select all
URI uri(argv[1]);
std::string path(uri.getPathAndQuery());
if (path.empty()) path = "/";
HTTPClientSession session(uri.getHost(), uri.getPort());
HTTPRequest req(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1);
session.sendRequest(req);
(...)
Does anyone could help me ?
Thanks.





