I am working on a prosody module and in that I have created some API end points. But I am unable to access them with curl.
module:depends("http");
module:provides("http", {
default_path = "/",
route = {
["GET room-max-participants"] = function(event)
return async_handler_wrapper(event, handle_get_max_occupants)
end,
["SET room-max-participants"] = function(event)
return async_handler_wrapper(event, handle_set_max_occupants)
end
}
});
And
curl http://localhost:5280/room-max-participants
is returning 404 error.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>404 Not Found</title>
<style>
body{
margin-top:14%;
text-align:center;
background-color:#F8F8F8;
font-family:sans-serif;
}
h1{
font-size:xx-large;
}
p{
font-size:x-large;
}
p+p {
font-size:large;
font-family:courier;
}
</style>
</head>
<body>
<h1>404 Not Found</h1>
<p>Whatever you were looking for is not here. Keep looking.</p>
<p>Unknown host: localhost</p>
</body>
</html>
Please help me resolving the issue.