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

Inconsistent behaviour of 'accept' method #22

Open
ilya-murzinov opened this issue May 18, 2016 · 2 comments
Open

Inconsistent behaviour of 'accept' method #22

ilya-murzinov opened this issue May 18, 2016 · 2 comments

Comments

@ilya-murzinov
Copy link
Contributor

ilya-murzinov commented May 18, 2016

This compiles

    val req = 
      .put("foo/bar")
      .withContent("Hello world", "text/plain")
      .accept("text/plain")

    req.send[String]()

But this doesn't

    val req = client
      .put("foo/bar")
      .accept("text/plain")
      .withContent("Hello world", "text/plain")

    req.send[String]()

with because can't find implicit CanBuildRequest instance

@jeremyrsmith
Copy link
Collaborator

@ilya-murzinov is this still an issue? Could be related to withContent (or other subsequent methods) confusing the type inference of the overall request. If it's still an issue, I'm not sure it can be solved, but it should at least be documented. (#notetoself)

@ilya-murzinov
Copy link
Contributor Author

@jeremyrsmith yes, this is still an issue.
To my intuition, seems that accept should always go last, otherwise there is some issue with type inference.

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

2 participants