11#define DART_EXPORT extern "C" __declspec(dllexport)
14 extern "C" __attribute__((visibility("default"))) __attribute((used))
25Content-Type: text/html; charset=UTF-8
35 std::thread([onResponse]() {
36 std::this_thread::sleep_for(std::chrono::seconds(3));
42 std::thread([onRequest]() {
44 std::this_thread::sleep_for(std::chrono::seconds(1));
DART_EXPORT void http_serve(void(*onRequest)(const char *))
DART_EXPORT void http_get(const char *uri, void(*onResponse)(const char *))
constexpr char kExampleRequest[]
constexpr char kExampleResponse[]
char * strdup(const char *str1)