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
  • 70,519
  • 61
  • 198
  • 274

2 Answers2

2

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

Community
  • 1
  • 1
Gant
  • 29,661
  • 6
  • 46
  • 65
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,356
  • 9
  • 13