All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.youi.http.LongHeaderKey.scala Maven / Gradle / Ivy

The newest version!
package io.youi.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 - 2024 Weber Informatics LLC | Privacy Policy