Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to send simple http request to my localhost:8080/program1.jsp. request should contain a message like "Hello server this is Request" how with vc++ it is possible?
Posted
Updated 28-Apr-14 19:42pm
v2
Comments
Sergey Alexandrovich Kryukov 29-Apr-14 2:09am    
There is no such thing as just the message in request. The body of request is contained of name/value pairs.
—SA

1 solution

Please see my comment to the question. It does not really make sense, because there is no such thing. You cannot simply send some arbitrary request; it content should depend on the metadata defined by the page receiving the request. Besides, it may or may not support one or another HTTP request method. All you do should be in compliance with the server side of your Web page (Web application, Web service). For further detail, please see: http://en.wikipedia.org/wiki/HTTP[^].

To implement HTTP request, use some suitable network library for C++. First of all, I would recommend to look at this one: http://cpp-netlib.org/0.9.2[^].

—SA
 
Share this answer
 
Comments
CPallini 29-Apr-14 3:29am    
5.
Sergey Alexandrovich Kryukov 29-Apr-14 10:56am    
Thank you, Carlo.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900