Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/avatars/690223941708415031/c7a97db56b94a6b760cd6b0375580431.png?size=512)
On the Creating an API guide, the tutorial suggests that /api/hello?name=John
should show a page that says "Hello John", but it gives me a 404 instead. It's worth noting that /api/hello/John
works as advertised. The contents of my app.jl
are as follows:
module App
using Genie
function greet()
return "Howdy, $(params(:name))!"
end
route("/api/hello/:name", greet, method=GET)
end;
![](https://cdn.discordapp.com/attachments/1195517277320249455/1195517277810999417/image.png?ex=65b4473a&is=65a1d23a&hm=efc3364ca163bffb4f9cd3d9f90ddf2e38f1348f72d48aa200472535fc4cb0b9&)
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
sorry that's a mistake, I'll fix it. the ? syntax does not work for params defined on the route path. It is intended for getting any parameter passed as ?param=value
from within the route handler with params()
. See the first section in this doc page
https://learn.genieframework.com/docs/reference/server/payloads
![Author Avatar](https://cdn.discordapp.com/avatars/690223941708415031/c7a97db56b94a6b760cd6b0375580431.png?size=512)
Changed the channel name: SOLVED This URL doesn't seem to work. Am I doing something wrong?