i trying set basic server using spray routing , use type represent 1 of forms puts.
i using formfields('some, 'fields).as(thing) notation described in documentation
at first glance assumed .as taking taking type , instantiating object of type using input defined in fromfields.
my example constructed this:
type updatepasswordrequest = tuple3[string, string, string] startserver(interface, port) { path("user" / intnumber) { useremail => put { formfields('password, 'password2, 'key).as(updatepasswordrequest) { req => //... } } } } after getting rather confused error couldn't resolve symbol updatepasswordrequest changed type val , @ least compiles.
what happening here? why expecting val? can pass type parameter function?
Comments
Post a Comment