Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding syntax sucks #41

Closed
bryce-anderson opened this issue Nov 26, 2014 · 2 comments
Closed

Decoding syntax sucks #41

bryce-anderson opened this issue Nov 26, 2014 · 2 comments
Milestone

Comments

@bryce-anderson
Copy link
Member

Stuff like

"Get form data from the user" **
    POST / "foopath" decoding(formEncoded) |>> { formData: Map[String, Seq[String]] =>
      Ok("Foo")
    }

doesn't work because of operator precedence, so instead, I'm forced to do

(("Get form data from the user" **
    POST / "foopath") decoding(formEncoded)) |>> { formData: Map[String, Seq[String]] =>
      Ok("Foo")
    }

or some other nonsense.

This should be fixed.

@bryce-anderson bryce-anderson added this to the 0.3.0 milestone Nov 26, 2014
@arouel
Copy link
Contributor

arouel commented Nov 26, 2014

I would propose the following decoding syntax

"Get form data from the user" **
    POST / "foopath" ^ formEncoded |>> { formData: Map[String, Seq[String]] =>
      Ok("Foo")
    }

bryce-anderson added a commit that referenced this issue Nov 27, 2014
Closes issue #41
This allows efficient infix usage.
@bryce-anderson
Copy link
Member Author

I believe this is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants