1

I am trying to send an HTTP request with the contents of a file set as the body of the HTTP request and want to get the response from a server using VC++.

Any help is appreciated. Thanks.

I think I was not very clear with what I wanted to do or I misunderstood the answers. Neways, what I want to accomplish is, one of my web-services accepts the data of a local file as the body of the HTTP request sent to it. I want to make a call to this service and send the contents of a txt file as the body of the HTTP request. In return I will get a response from the service which I want to get in a string variable.

Thanks.

lostInTransit
  • 69,487
  • 59
  • 196
  • 271

2 Answers2

2

You can use cURL library. There is also a similar topic Programmatically reading a web page

Community
  • 1
  • 1
Gant
  • 29,363
  • 6
  • 45
  • 63
1

You can always use WinInet. Check out the docs here:

http://msdn.microsoft.com/en-us/library/aa385331(VS.85).aspx

HTH

Colby Africa

Colby Africa
  • 1,346
  • 9
  • 13