response.header[`X-Transaction-Id`]
but it always give me None, changing it to lookup by name return expected value.
response.headers.find(_.lowercaseName() == `X-Transaction-Id`.name.toLowerCase)
It looks like it is related to modeling custom headers as RawHeader.According to http://doc.akka.io/docs/akka-http/10.0.5/scala/http/common/http-model.html:"Thanks to extendingModeledCustomHeader
instead of the plainCustomHeader
such header can be matched"Should it apply to header extraction in the way above as well? Is it a bug? or as designed?Regards,Kyrylo
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
final case class RateLimitLimit(limit: String) extends ModeledCustomHeader[RateLimitLimit] {
override def companion: ModeledCustomHeaderCompanion[RateLimitLimit] = RateLimitLimit
override def renderInRequests(): Boolean = true
override def renderInResponses(): Boolean = true
override def value(): String = limit
}
object RateLimitLimit extends ModeledCustomHeaderCompanion[RateLimitLimit] {
override def name: String = "X-RateLimit-Limit"
override def parse(value: String): Try[RateLimitLimit] = Success(RateLimitLimit(value))
}
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.