You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This way the query parameter is optional. It may seem intuitive, but I have tried several different ways before trying this (e.g. just making param: Option[String]. or providing overloads of def hello).
The text was updated successfully, but these errors were encountered:
You can bind variables to endpoints by declaring them as parameters: these are either taken from a path-segment matcher of the same name (e.g. postId above), or from query-parameters of the same name (e.g. param above). You can make param take a : String to match ?param=hello, an : Int for ?param=123 a Seq[T] (as above) for repeated params such as ?param=hello¶m=world, or : Option[T] for cases where the ?param=hello is optional.
This took me a while to find:
or:
This way the query parameter is optional. It may seem intuitive, but I have tried several different ways before trying this (e.g. just making param: Option[String]. or providing overloads of def hello).
The text was updated successfully, but these errors were encountered: