-1

I searched about sending an HTTP Request using C++ or C Programming Language, and I found some libraries on GitHub and most of them are for Linux use.

in my case i just need a little basic piece of code that send two parameters through a HTTP GET or POST Request using c or c++ language under Windows .

For example : 'www.website.com/targetpage.php?param1=value&m2=value' .

  • [libcurl](https://curl.haxx.se/libcurl/) is a small library with these features. [Qt](https://www.qt.io/) also supports network with QNetwork and QUrl – Thomas Sablik Aug 06 '18 at 10:10
  • 1
    I won't call libcurl "small", but that would be my first choice as well. – roalz Aug 06 '18 at 10:38
  • i used libcurl.exe and the system('curl www.website.com/target.php?param=value') command thanks guys – aimen aimen Aug 06 '18 at 16:56

1 Answers1

1

Check out Boost Beast.

See this related question for how to send an HTTP request. You can send your parameters by modifying the req.url variable. So, in your case it would be /targetpage.php?param1=value&m2=value' instead of /.