@Override public final Permission getPermission() {
    String hostName = getURL().getHost();
    int hostPort = url.getPort() != -1
          ? url.getPort()
          : HttpUrl.defaultPort(url.getProtocol());
    if (usingProxy()) {
      InetSocketAddress proxyAddress = (InetSocketAddress) client.getProxy().address();
      hostName = proxyAddress.getHostName();
      hostPort = proxyAddress.getPort();
    }
    return new SocketPermission(hostName + ":" + hostPort, "connect, resolve");
  }
Returns the value of the field corresponding to the {@code fieldName}, or
null if there is no such field. If the field has multiple values, the
last value is returned.
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/connectors/ok/HttpURLConnectionImpl.java