i am trying to define an Endpoint with param in the middle.
something similar to:
get("foo" :: param("id") :: "goo")
so, i can call it with the following rest call:
but, for some reason, it doesn't work.
any idea ?
thanks, Eran.
i am trying to define an Endpoint with param in the middle.
something similar to:
get("foo" :: param("id") :: "goo")
so, i can call it with the following rest call:
but, for some reason, it doesn't work.
any idea ?
thanks, Eran.
Copyright © 2021 Jogjafile Inc.
In your
get("foo" :: param("id") :: "goo")handler, this"foo" :: param("id") :: "goo"is is calledroute path.And this
param("id")is actually apath-parameterand not aquery-parameter.Standard URL scheme looks like following,
path-parametersare actually not part of standardURL schemebut are extracted frompathpart of URL using regular expression matching by modern http frameworks.So... you need to access it with http url -
http://mydomain/foo/99/goo