Some quick http refactors to make websockets less magic.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4705 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-12-30 16:29:16 +00:00
parent d556cbc835
commit b6a3923b27
5 changed files with 77 additions and 70 deletions

View File

@ -737,8 +737,8 @@ static void _test_http(const tf_test_options_t* options)
uv_loop_t loop = { 0 };
uv_loop_init(&loop);
tf_http_t* http = tf_http_create(&loop);
tf_http_add_handler(http, "/hello", k_tf_http_handler_flag_none, _test_http_handler, NULL);
tf_http_add_handler(http, "/post", k_tf_http_handler_flag_none, _test_http_handler_post, NULL);
tf_http_add_handler(http, "/hello", _test_http_handler, NULL);
tf_http_add_handler(http, "/post", _test_http_handler_post, NULL);
tf_http_listen(http, 23456);
test_http_t test = { .loop = &loop };