![]() |
как сделать POST запрос?
|
https://raw.githubusercontent.com/elnormous/HTTPRequest/master/include/HTTPRequest.hpp
C++: [CODE] #include "HTTPRequest.hpp" try { http :: Request request { "http://test.com/test" } ; const std :: string body = "foo=1&bar=baz" ; const auto response = request . send ( "POST" , body , { { "Content-Type" , "application/x-www-form-urlencoded" } } ) ; std :: cout |
Только ещё напиши человеку, какие надо инклуды и прочее подключить, чтобы он сам с ошибками не мучился.
[QUOTE="legendabrn"] https://raw.githubusercontent.com/elnormous/HTTPRequest/master/include/HTTPRequest.hpp C++: [CODE] #include "HTTPRequest.hpp" try { http :: Request request { "http://test.com/test" } ; const string body = "foo=1&bar=baz" ; const auto response = request . send ( "POST" , body , { { "Content-Type" , "application/x-www-form-urlencoded" } } ) ; std :: cout |
Цитата:
|
Цитата:
Ладно, если будут ошибки, человек написать тут сможет. |
|
Цитата:
а ответ на твою ошибку связанную с библиотекой: C++: Код:
#pragma comment(lib, "ws2_32.lib")https://forum.antichat.xyz/attachments/28006835/ |
спасибо
|
| Время: 08:04 |