Example usage for org.apache.commons.httpclient URI getAuthority

List of usage examples for org.apache.commons.httpclient URI getAuthority

Introduction

In this page you can find the example usage for org.apache.commons.httpclient URI getAuthority.

Prototype

public String getAuthority() throws URIException 

Source Link

Document

Get the authority.

Usage

From source file:org.zaproxy.zap.extension.openapi.ExtensionOpenApi.java

public List<String> importOpenApiDefinition(final URI uri, final String siteOverride, boolean initViaUi) {
    Requestor requestor = new Requestor(HttpSender.MANUAL_REQUEST_INITIATOR);
    requestor.addListener(new HistoryPersister());
    try {//from   ww w.j  a v a2s  . c  om
        return importOpenApiDefinition(Scheme.forValue(uri.getScheme().toLowerCase()), uri.getAuthority(),
                requestor.getResponseBody(uri), siteOverride, initViaUi);
    } catch (IOException e) {
        if (initViaUi) {
            View.getSingleton().showWarningDialog(Constant.messages.getString("openapi.io.error"));
        }
        LOG.warn(e.getMessage(), e);
    } catch (Exception e) {
        LOG.error(e.getMessage(), e);
    }
    return null;
}