uk.ac.starlink.auth

## Interface UrlConnector

- All Known Implementing Classes:
    ContentCoding
  Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface UrlConnector

  Defines how a connection is obtained from a URL.
  Since:
    18 Jun 2020

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connect(java.net.HttpURLConnection hconn)` Opens communication to an HTTP resource.

- - ### Method Detail

    - #### connect

          void connect(java.net.HttpURLConnection hconn)
                throws java.io.IOException

      Opens communication to an HTTP resource. The implementation will presumably at least call `URLConnection.connect()`, but it may optionally perform other actions as well, such as configuring the request headers as required and writing to the connection's output stream, before returning.

      If this object is being used with AuthManager, it will typically be a good idea to call `setInstanceFollowRedirects(false)`, since redirection can be handled by AuthManager.

      Parameters:
        `hconn` - URL connection; on entry connect() has not yet been called, but on exit it has
      Throws:
        `java.io.IOException`