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

error when using play 2.6.0 #6

Open
thinkrapido opened this issue Jun 26, 2017 · 6 comments
Open

error when using play 2.6.0 #6

thinkrapido opened this issue Jun 26, 2017 · 6 comments

Comments

@thinkrapido
Copy link

thinkrapido commented Jun 26, 2017

/*
* ApiRequestHeader for requests that don't require authentication
*/
class ApiRequest[A](val request: Request[A]) extends WrappedRequest[A](request) with ApiRequestHeader[Request[A]] {
  override def remoteAddress = request.remoteAddress
  override def method = request.method
  override def uri = request.uri
  override def maybeBody: Option[String] = request.body match {
    case body: JsValue => Some(Json.prettyPrint(body))
    case body: String => if (body.length > 0) Some(body) else None
    case body => Some(body.toString)
  }
}

with play 2.6.0 RequestHeader has changed and remoteAddress and uri cannot be overridden here because of 'final' declaration

Adrian, do you have any suggestions how to fix this?

@adrianhurt
Copy link
Owner

Sorry, but I haven't updated the repository to Play 2.6 yet. Meanwhile, you can check the migration guide.

@aneeshde
Copy link

Any plans to update to Play 2.6?

@ghost
Copy link

ghost commented Sep 21, 2018

I did it to play 2.6 and for now we use it without problems, if you want I take the time to update it ...

@g12mcgov
Copy link

g12mcgov commented Oct 1, 2018

I did it to play 2.6 and for now we use it without problems, if you want I take the time to update it ...

Hey, do you have an example of this somewhere? Would love to see!

@ghost
Copy link

ghost commented Oct 9, 2018

Not, but in max one week i push the changes... in my fork code...and I notify you

@ghost
Copy link

ghost commented Oct 14, 2018

He did not let me go up:
image

You can see the changes in my fork: https://github.com/rechemendia/play-api-rest-seed/commit/46cf06641aed5d4c631e8a1f96502a1606d6e439

See in builds.sbt:
//TODO: sorry, I do not use it, see more -> https://github.com/sbt/sbt-scalariform
//scalariformItSettings

regards

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

No branches or pull requests

4 participants