MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / ui_log_post

Function ui_log_post

tests/test_httpd.c:1107–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1105}
1106
1107static int ui_log_post(int port, const char *body, char *resp, size_t respsz) {
1108 size_t cap = strlen(body) + 512;
1109 char *req = malloc(cap);
1110 if (!req)
1111 return 0;
1112 snprintf(req, cap,
1113 "POST /api/ui-log HTTP/1.1\r\nHost: 127.0.0.1:%d\r\n"
1114 "Content-Type: application/json\r\nContent-Length: %zu\r\n\r\n%s",
1115 port, strlen(body), body);
1116 int n = th_http(port, req, resp, respsz);
1117 free(req);
1118 return n;
1119}
1120
1121static int activity_interrupt_rows(unsigned kind, void *database, void *statement, void *unused) {
1122 (void)kind;

Callers 1

test_httpd.cFile · 0.85

Calls 1

th_httpFunction · 0.85

Tested by

no test coverage detected