title: In the scala spray framework, how can I create multiple http clients that have different configurations (e.g., timeouts, retries)
body: <p>I have two spray http clients, such as the following:</p>
  
  <pre><code>  val pipelineFoo: HttpRequest =&gt; Future[Foo] = (
      sendReceive
      ~&gt; unmarshal[Message.Foo])
  
    val pipelineBar: HttpRequest =&gt; Future[Bar] = (
      sendReceive
      ~&gt; unmarshal[Message.Bar])
  
    def execFoo(h: String, p: Int): Future[Foo] = {
      val uri = Uri.from(scheme = "http", host = h, port = p, path = "/foo")
      pipelineFoo(Get(uri))
    }
  
    def execBar(h: String, p: Int): Future[Bar] = {
      val uri = Uri.from(scheme = "http", host = h, port = p, path = "/bar")
      pipelineBar(Get(uri))
    }
  </code></pre>
  
  <p>I would like have the foo request retry several times with a long timeout, and have the bar request not retry and have a short timeout (say 1 second). How can I achieve this in spray (sorry if this is somewhere in the documentation, but I've been unable to find it -- I've only found some documentation on setting such config parameters globally).</p>