title: Poco HTTPClientSession adding headers to HTTPRequest
body: <p>Try to send POST method to server using JSON. But, server also requires <code>model, platform and platform version</code> as headers to request. How can I add these headers to HTTPRequest. At Postman, I can add it in Headers tab. Eg. <code>Model: Redmi 4 Platform: android</code>. Feel free to edit to make it clear to others.
  Below there is my code who <code>HTTPRequest</code> creates: </p>
  
  <pre><code>Poco::JSON::Object obj;
  obj.set("login", "log123");
  
  obj.set("password","pas123");
  
  Poco::Net::HTTPClientSession session("http://hostAddress", 
      80); //giving host name and port number
  Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_POST,
          "http://requestAddress","1.1"); //initializing request body
  Poco::Net::HTTPResponse response;
  
  
  std::stringstream ss;
  obj.stringify(ss);
  
  request.setContentType("application/json");
  request.setContentLength(ss.str().length());
  
  std::ostream&amp; oStream = session.sendRequest(request);// sends request, returns open stream
  
  obj.stringify(oStream);
  
  std::istream&amp; iStream = session.receiveResponse(response);
  </code></pre>
  
  <p>I tried to find some information at <a href="https://pocoproject.org/docs/Poco.Net.HTTPRequest.html" rel="nofollow noreferrer">https://pocoproject.org/docs/Poco.Net.HTTPRequest.html</a>. <a href="https://pocoproject.org/docs/Poco.Net.HTTPMessage.html" rel="nofollow noreferrer">https://pocoproject.org/docs/Poco.Net.HTTPMessage.html</a>. But without results.</p>