mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-12 18:37:12 +00:00
81a43f028f
Java, C, C++, Ruby, C#, Kotlin, Scala, PHP via tree-sitter (13 total) benchmark.py measures BFS subgraph tokens vs corpus tokens 5 skill bug fixes (cohesion crash, dead step, missing MCP tool)
31 lines
714 B
C++
31 lines
714 B
C++
#include <iostream>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class HttpClient {
|
|
public:
|
|
HttpClient(const std::string& baseUrl) : baseUrl_(baseUrl) {}
|
|
|
|
std::string get(const std::string& path) {
|
|
return buildRequest("GET", path);
|
|
}
|
|
|
|
std::string post(const std::string& path, const std::string& body) {
|
|
return buildRequest("POST", path);
|
|
}
|
|
|
|
private:
|
|
std::string baseUrl_;
|
|
|
|
std::string buildRequest(const std::string& method, const std::string& path) {
|
|
return method + " " + baseUrl_ + path;
|
|
}
|
|
};
|
|
|
|
int main() {
|
|
HttpClient client("https://api.example.com");
|
|
std::string response = client.get("/users");
|
|
std::cout << response << std::endl;
|
|
return 0;
|
|
}
|