Re: [akka-user] Processing `If-None-Match`

2018-01-08 Thread Colin Bester
I just knew I was running in circles, thanks! On Monday, January 8, 2018 at 11:15:18 AM UTC-6, Konrad Malawski wrote: > > You can deconstruct the data structure on your own like this: > > val tag = EntityTag("kappa", weak = true) > val ifNoneMatch = `If-None-Match`(tag) > > ifNoneMatch.m match { >

Re: [akka-user] Processing `If-None-Match`

2018-01-08 Thread Konrad “ktoso” Malawski
You can deconstruct the data structure on your own like this: val tag = EntityTag("kappa", weak = true) val ifNoneMatch = `If-None-Match`(tag) ifNoneMatch.m match { case EntityTagRange.Default(tags) if tags.nonEmpty ⇒ tags.head.tag case EntityTagRange.Default(tags) ⇒ "" case EntityTagRange.

[akka-user] Processing `If-None-Match`

2018-01-08 Thread Colin Bester
On server side using scala, akka-http (10.x) I am using *optionalHeaderValueByType[`If-None-Match`]() { reqETag => ... } *to extract `If-None-Match` header where reqETag is of type *Option[If-None-Match].* On client side, the If-None-Match is created using val entityTag = EntityTag(SomeSecur