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

Closed
schrepfler opened this Issue Jul 29, 2015 · 1 comment

Comments

2 participants
@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.

@scosenza

This comment has been minimized.

Contributor

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