@Override
  public HttpURLConnection getConnection(String spec,
                                         String requestMethod,
                                         String body,
                                         Map<String, String> headers) throws IOException {
    return getHttpURLConnection(spec, requestMethod, headers, body == null ? null : body.getBytes());
  }
Get an instance of HostPortRestrictionHandler

@return
ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java