title: How to receive HTTP GET and POST requests in C socket program?
body: <p>I am trying to create a small C socket server. The server sends out the HTTP/HTML responses fine enough. But the clients would be sending it HTML requests and clients can be different devices - mobile apps, browsers etc. I need to log the requests about which type of devices are requesting what. </p>
  
  <p>I happen to know that browser usually sends cookies and its user-agent info to the server as well and I want my server to be able to record the cookie and user-agent strings as well. </p>
  
  <p>So how do I enable the reading of HTTP headers in my C/C++ server?</p>