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

Unable to retrieve post parameters #26

Closed
mairbek opened this issue Nov 11, 2012 · 5 comments
Closed

Unable to retrieve post parameters #26

mairbek opened this issue Nov 11, 2012 · 5 comments

Comments

@mairbek
Copy link
Contributor

mairbek commented Nov 11, 2012

I'm unable to retrieve post parameters to handle the form submit.

Here is a simple app that reproduces the problem

object Main {

  class ExampleApp extends Controller {

    post("/param") {
      request =>
        request.params.get("test") match {
          case Some(value) => render.plain(value.toString).status(200).toFuture
          case None => render.plain("No param").status(404).toFuture
        }
    }

  }


  def main(args: Array[String]) {
    val app = new ExampleApp

    FinatraServer.register(app)
    FinatraServer.start()

  }

}

When I execute

curl -iH 'Content-Type: application/x-www-form-urlencoded' -XPOST http://localhost:7070/param -d 'test=myparam'

I get no param response

HTTP/1.1 404 Not Found
Content-Type: text/plain
Content-Length: 8

No param
@caarlos0
Copy link

caarlos0 commented Nov 7, 2013

I have this same issue with PUT and PATCH requests...

@capotej
Copy link
Contributor

capotej commented Nov 13, 2013

Looks like we need to broaden the scope of this commit: mairbek@7956428

Filed under: #71, thanks!

@caarlos0
Copy link

thanks!

@capotej
Copy link
Contributor

capotej commented Jan 7, 2014

@caarlos0, this is now fixed in Finatra 1.5.0, however, PATCH params is still broken due to an underlying bug in finagle, will ship this soon.

@caarlos0
Copy link

caarlos0 commented Jan 7, 2014

Nice! Thanks!

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

No branches or pull requests

3 participants