@Immutable public final class VerboseWire extends Object implements Wire
This wire makes HTTP request and response details visible in log (we're using SLF4J logging facility), for example:
String html = new JdkRequest("http://goggle.com") .through(VerboseWire.class) .header(HttpHeaders.ACCEPT, MediaType.TEXT_PLAIN) .fetch() .body();
The class is immutable and thread-safe.
Constructor and Description |
---|
VerboseWire(Wire wire)
Public ctor.
|
public Response send(Request req, String home, String method, Collection<Map.Entry<String,String>> headers, byte[] content) throws IOException
send
in interface Wire
req
- Requesthome
- URI to fetchmethod
- HTTP methodheaders
- Headerscontent
- HTTP bodyIOException
- if failsCopyright © 2012–2014 jcabi.com. All rights reserved.