How to receive HTTP Response
<pre><code>char url[]= "GET " PATH "\r\n"
"Host: " HOST "\r\n"
"User-Agent: Mozilla/5.0\r\n"
"\r\n";    
write(sfd, url, strlen(url)); // write(fd, char[]*, len);  
bzero(buffer, BUFFER_SIZE);
while(read(sfd, buffer, 1024 - 1) != 0){
    printf("%s", BUFFER_SIZE);
    bzero(buffer, 1024);
}
</code></pre>

<p>Result:
<a href="https://i.stack.imgur.com/bGK4q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bGK4q.png" alt="enter image description here"></a></p>

<p>I'm writing a HTTP Client using Socket. The problem here is the read() func only return HTTP respond body. But i want it to fetch http respond header also. I don't know what i'm doing wrong here.</p>