HTTP request

Hello. I'm downloading a webpage with winsoc. I just wonder how to format the HTTP request so it does not send this:

HTTP/1.0 200 OK
Date: Thu, 13 Apr 2006 11:52:01 GMT
Server: Apache/1.3.27 (Unix)
Cache-Control: max-age=900
Expires: Thu, 13 Apr 2006 12:07:01 GMT
Last-Modified: Thu, 13 Apr 2006 11:51:23 GMT
ETag: "2b400e-214fd-443e3b3b"
Accept-Ranges: bytes
Content-Length: 136445
Content-Type: text/html; charset=iso-8859-1
X-Cache: HIT from
Age: 561
X-Cache: HIT from
Connection: close

// Format the HTTP request
sprintf(szBuffer, "GET %s HTTP/1.1\nHost: %s\n\n", lpFileName, lpServerName);

//GET /index.html HTTP/1.1
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think you need
GET index.html HTTP/1.1

i mean instead of sending

//GET /index.html HTTP/1.1

just send
GET index.html HTTP/1.1
I didnt write code but connected to 80 port of using telnet
and sent
GET /index.html HTTP/1.1
it worked...
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

m-jansenAuthor Commented:
But it still sends all the stuff about date, server and etc. I only want the content of the html file. How to only get only that? Do I need to parse what I get to exclude it or is it some kind of mechanism to control it?
Hi m-jansen.

HTTP specification does not provide command, which will return only html page content. All http responses always contain HTTP headers.
What you need, is to parse response, till you get \n\r symbol, after it begins your html content.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
yep... you need to parse it!!
m-jansenAuthor Commented:
thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.