@Immutable public interface Wire
An instance of this interface can be used in
Request.through(Class,Object...) to decorate
an existing wire, for example:
String html = new JdkRequest("http://google.com")
.through(VerboseWire.class)
.through(RetryWire.class)
.header("Accept", "text/html")
.fetch()
.body();
Every Wire decorator passed to through() method
wraps a previously existing one.
| Modifier and Type | Method and Description |
|---|---|
Response |
send(Request req,
String home,
String method,
Collection<Map.Entry<String,String>> headers,
InputStream content,
int connect,
int read)
Send request and return response.
|
Response send(Request req, String home, String method, Collection<Map.Entry<String,String>> headers, InputStream content, int connect, int read) throws IOException
req - Requesthome - URI to fetchmethod - HTTP methodheaders - Headerscontent - HTTP bodyconnect - The connect timeoutread - The read timeoutIOException - if failsCopyright © 2012–2017 jcabi.com. All rights reserved.