config: Update 2 files
All checks were successful
dropshell-build multiarch / build (linux/amd64) (push) Successful in 18s
dropshell-build multiarch / build (linux/arm64) (push) Successful in 25s
dropshell-build multiarch / create-manifest (push) Successful in 13s

This commit is contained in:
Your Name
2025-06-29 15:56:23 +12:00
parent ea0ad2daa5
commit 11e3d20a4c
3 changed files with 29 additions and 1 deletions

View File

@ -6,6 +6,7 @@
"${workspaceFolder}/**", "${workspaceFolder}/**",
"${workspaceFolder}/tests/ipdemo/src", "${workspaceFolder}/tests/ipdemo/src",
"${workspaceFolder}/tests/ipdemo/src/autogen", "${workspaceFolder}/tests/ipdemo/src/autogen",
"${workspaceFolder}/tests/cprdemo/src",
"/usr/local/include", "/usr/local/include",
"/usr/include", "/usr/include",
"/usr/include/x86_64-linux-gnu", "/usr/include/x86_64-linux-gnu",
@ -15,7 +16,8 @@
"/opt/include" "/opt/include"
], ],
"defines": [ "defines": [
"DROGON_HEADERS_MISSING" "DROGON_HEADERS_MISSING",
"CPR_HEADERS_MISSING"
], ],
"compilerPath": "/usr/bin/g++", "compilerPath": "/usr/bin/g++",
"cStandard": "c17", "cStandard": "c17",

View File

@ -0,0 +1,21 @@
#pragma once
#ifdef CPR_HEADERS_MISSING
#include <string>
namespace cpr {
struct Url {
Url(const std::string& url) : url(url) {}
std::string url;
};
struct Response {
int status_code;
std::string text;
};
Response Get(const Url& url);
}
#endif

View File

@ -1,6 +1,11 @@
#include <iostream> #include <iostream>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#ifdef CPR_HEADERS_MISSING
#include "cpr_stubs.hpp"
#else
#include <cpr/cpr.h> #include <cpr/cpr.h>
#endif
#include "version.hpp" #include "version.hpp"
#include "assert.hpp" #include "assert.hpp"