org.apache.hc.client5.http.ssl

## Class SpkiPinningClientTlsStrategy.Builder

- java.lang.Object
- - org.apache.hc.client5.http.ssl.SpkiPinningClientTlsStrategy.Builder

Enclosing class:
  SpkiPinningClientTlsStrategy

    public static final class SpkiPinningClientTlsStrategy.Builder
    extends Object

Builder for `SpkiPinningClientTlsStrategy`.

### Method Summary

All Methods Instance Methods Concrete Methods
`SpkiPinningClientTlsStrategy.Builder` `add(String hostPattern, String... pins)` Add pins for a host pattern.
`SpkiPinningClientTlsStrategy` `build()` Build an immutable `SpkiPinningClientTlsStrategy`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### add

    public SpkiPinningClientTlsStrategy.Builder add(String hostPattern,
                                                    String... pins)

Add pins for a host pattern.

Parameters:
  `hostPattern` - exact host (e.g. `api.example.com`) or single-label wildcard (e.g. `*.example.com`).
  `pins` - one or more pins in the form `sha256/BASE64`.
Returns:
  this
Throws:
  `IllegalArgumentException` - if a pin is not `sha256/...`, has invalid Base64, or wrong length.

#### build

    public SpkiPinningClientTlsStrategy build()

Build an immutable `SpkiPinningClientTlsStrategy`.