Код: Выделить всё
#include
#include
#include
using namespace web;
using namespace web::http;
using namespace web::http::client;
int main() {
http_client client(U("https://example.com/api/endpoint"));
http_request request(methods::GET);
try {
auto response = client.request(request).get();
if (response.status_code() == status_codes::OK) {
auto body = response.extract_string().get();
std::wcout
Подробнее здесь: [url]https://stackoverflow.com/questions/79250814/why-am-i-getting-a-503-error-with-httpclient-while-postman-works-for-the-same-re[/url]