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

Mapping a header by name to a case class requires additional metadata #225

schrepfler opened this issue Jul 29, 2015 · 1 comment


Copy link

@schrepfler schrepfler commented Jul 29, 2015

 case class UserAgentRequest(@Header @JsonProperty("User-Agent") userAgent: String)

Using JsonProperty is needed if mapping a header onto a case class. I think this is a bug and probably headers being case insensitive a specific Header metadata (either on the Header annotation or a specific HeaderProperty annotation) needs to be available.

Copy link

@scosenza scosenza commented Jul 29, 2015

Since "User-Agent" contains a '-', you need to escape the parameter name using backticks:
@Header user-agent: String

@scosenza scosenza closed this Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants