Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SuperWire.scala « http « rorschach « getbootstrap « com « scala « main « src - github.com/twbs/rorschach.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f098cd922e622987999dec91cf6332fe75334f03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.getbootstrap.rorschach.http

import java.util.{Collection=>JavaCollection}
import java.util.Map.{Entry=>MapEntry}
import java.io.InputStream
import com.jcabi.github.wire.RetryCarefulWire
import com.jcabi.http.{Wire,Request,Response}

case class SuperWire(private val wire: Wire, userAgent: UserAgent, threshold: Int) extends Wire {
  private val wrappedWire = UserAgentWire(wire = new RetryCarefulWire(wire, threshold), userAgent = userAgent)

  @Override
  def send(
    request: Request,
    home: String,
    method: String,
    headers: JavaCollection[MapEntry[String, String]],
    content: InputStream
  ): Response = wrappedWire.send(request, home, method, headers, content)
}