Closed BaseMax closed 3 years ago
Hello @BaseMax ,
As mentioned in the documentation where all the endpoints are listed, all the endpoints provided by the simple example code start with the prefix /test
:
http://localhost:8537/test
http://localhost:8537/test/empty
http://localhost:8537/test/param/:foo
That's because all the endpoints declaration contain PREFIX
in the prefix parameter:
#define PREFIX "/test"
ulfius_add_endpoint_by_val(&instance, "GET", PREFIX, "/empty", 0, &callback_get_empty_response, NULL);
ulfius_add_endpoint_by_val(&instance, "GET", PREFIX, "/param/:foo", 0, &callback_all_test_foo, "user data 1");
Dear Nicolas,
Thanks a lot. You saved my day. :+1: :heart: @babelouest
Describe the issue
Why All routes go to default endpoint?
http://localhost:8537/empty
http://localhost:8537/param/1
System (please complete the following information):