Akka Http Client :Custom headers
<p>I am trying to use Akka-Http for invoking REST url. I am following <a href="http://doc.akka.io/docs/akka/2.4.10/scala/http/client-side/request-level.html#Using_the_Future-Based_API_in_Actors" rel="noreferrer">this</a> example from the akka documentation. 
Using this I am able to make the rest call. But I am not able to find out how to add custom request headers. I tried using ModeledCustomHeader, but still request is not having header. Here is my example. </p>

<pre><code>final class ApiTokenHeader(token: String) extends ModeledCustomHeader[ApiTokenHeader] {
  override def renderInRequests = false
  override def renderInResponses = false
  override val companion = ApiTokenHeader
  override def value: String = token
}
object ApiTokenHeader extends ModeledCustomHeaderCompanion[ApiTokenHeader] {
  override val name = "apiKey"
  override def parse(value: String) = Try(new ApiTokenHeader(value))
}
</code></pre>

<p>This is how I am invoking,</p>

<pre><code>def invokeHttpRequest(cmd: WSRequestCommand) = {
    val s: HttpRequest = HttpRequest(uri = cmd.url).addHeader(ApiTokenHeader(cmd.apiKey))

    sender ! http.singleRequest(s)
  }
</code></pre>

<p>Instead of addHeader, i tried with addHeaders(), but Seq(ApiTokenHeader) is not working as it is giving compilation error. </p>

<pre><code>val s: HttpRequest = HttpRequest(uri = cmd.url, headers = Seq(ApiTokenHeader(cmd.apiKey)))
</code></pre>

<blockquote>
  <p>Error:(55, 66) type mismatch;  found   :
  Seq[com.myapp.http.core.ApiTokenHeader]  required:
  scala.collection.immutable.Seq[akka.http.scaladsl.model.HttpHeader]
      val s: HttpRequest = HttpRequest(uri = cmd.url, headers = Seq(ApiTokenHeader(cmd.apiKey)))
  //.addHeader(ApiTokenHeader(cmd.apiKey))</p>
</blockquote>

<p>Can someone help me to add multiple custom headers for my request ? What am I doing wrong here ?</p>