reading data in http client application

Hello everyone,

I'm trying to write an http client application using BSD API.

At the moment I'm able to connect my client board to the server, send a request to the server and read the answer from the server.

It cloud be seem enought, but I have some problem because:

1. first all I'd like to read the http header, in order to get some informations about the stauts code, the content-type and the lenght of the http body.

2. then, If all is ok I'd like to read the body.

In order to do those two steps, I think that the better things is to read the received packet line by line using the CRLF delimiter.

In this way I could read all the http header information, then I could check the end of the http header and after I could read all the data of the body.

Could someone suggest how I can read data checking the presence of CRLF delimiter?

Thanks in advance,


More questions in this forum