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)
}
|