io.moia.scalaHttpClient.HttpMetrics.scala Maven / Gradle / Ivy
The newest version!
package io.moia.scalaHttpClient
import org.apache.pekko.http.scaladsl.model.{HttpMethod, HttpResponse, Uri}
trait HttpMetrics[LoggingContext] {
def meterResponse(method: HttpMethod, path: Uri.Path, response: HttpResponse)(implicit ctx: LoggingContext): Unit
}
object HttpMetrics {
def none[LoggingContext]: HttpMetrics[LoggingContext] =
new HttpMetrics[LoggingContext] {
override def meterResponse(method: HttpMethod, path: Uri.Path, response: HttpResponse)(implicit ctx: LoggingContext): Unit = ()
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy