spice.http.LongHeaderKey.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spice-core_3 Show documentation
Show all versions of spice-core_3 Show documentation
Core functionality leveraged and shared by most other sub-projects of YouI.
package spice.http
import scala.util.Try
class LongHeaderKey(val key: String, val commaSeparated: Boolean = true) extends TypedHeaderKey[Long] {
override def value(headers: Headers): Option[Long] = Try(headers.first(this).map(_.toLong)).getOrElse(None)
override def apply(value: Long): Header = Header(this, value.toString)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy