Class TrustedWire

java.lang.Object
com.jcabi.http.wire.TrustedWire
All Implemented Interfaces:
Wire

@Immutable public final class TrustedWire extends Object implements Wire
Wire that ignores SSL PKIX verifications.

This wire ignores :

 String html = new JdkRequest("http://goggle.com")
   .through(TrustedWire.class)
   .fetch()
   .body();

The class is immutable and thread-safe.

Since:
1.10
  • Constructor Details

    • TrustedWire

      public TrustedWire(Wire wire)
      Public ctor.
      Parameters:
      wire - Original wire
  • Method Details

    • send

      public Response send(Request req, String home, String method, Collection<Map.Entry<String,String>> headers, InputStream content, int connect, int read) throws IOException
      Description copied from interface: Wire
      Send request and return response.
      Specified by:
      send in interface Wire
      Parameters:
      req - Request
      home - URI to fetch
      method - HTTP method
      headers - Headers
      content - HTTP body
      connect - The connect timeout
      read - The read timeout
      Returns:
      Response obtained
      Throws:
      IOException - if fails