@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)
Send request and return response.
|
Response send(Request req, String home, String method, Collection<Map.Entry<String,String>> headers, InputStream content) throws IOException
req
- Requesthome
- URI to fetchmethod
- HTTP methodheaders
- Headerscontent
- HTTP bodyIOException
- if failsCopyright © 2012–2014 jcabi.com. All rights reserved.