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
FromParam has instances for some common types, but it doesn't have an instance for String. That's not such a big deal, because usually it's nicer to use Text. But since a lot of functions from Prelude still use String, it makes sense to let users have String params as well.
Adding a String instance will let people write a route like this:
FromParam
has instances for some common types, but it doesn't have an instance forString
. That's not such a big deal, because usually it's nicer to useText
. But since a lot of functions from Prelude still useString
, it makes sense to let users haveString
params as well.Adding a
String
instance will let people write a route like this:route ctxt [ path "hello" // param "name" ==> helloHandler ]
and a handler like this:
And when you went to "/hello?name=Suzy", you would see "Hello Suzy".
Right now, you would get an error that there's no
FromParam
instance forString
.The text was updated successfully, but these errors were encountered: