Package io.fathom.http

Examples of io.fathom.http.HttpRequest


    public StorageObject getObject(String path, GetFileOption... options) throws RestClientException {
        return getObject(path, Arrays.asList(options));
    }

    public StorageObject getObject(String path, List<GetFileOption> options) throws RestClientException {
        HttpRequest request = buildGet(path);

        for (GetFileOption option : options) {
            option.modifyRequest(request);
        }
View Full Code Here


        }
        return ret;
    }

    public void createBucket(String bucket) throws RestClientException {
        HttpRequest request = buildPost(bucket);
        doStringRequest(request);
    }
View Full Code Here

    public OpenstackDnsClient(HttpClient httpClient, URI uri, TokenProvider tokenProvider) {
        super(httpClient, uri, tokenProvider);
    }

    public List<Zone> listZones() throws RestClientException {
        HttpRequest request = buildGet("v2/zones");
        ZoneList zones = doRequest(request, ZoneList.class);
        return zones.zones;
    }
View Full Code Here

    public List<Recordset> listRecordsets(String zoneId, boolean details) throws RestClientException {
        String url = "v2/zones/" + zoneId + "/recordsets";
        if (details) {
            url += "/details";
        }
        HttpRequest request = buildGet(url);
        RecordsetList recordsets = doRequest(request, RecordsetList.class);
        return recordsets.recordsets;
    }
View Full Code Here

            throw new IllegalArgumentException();
        }
        if (recordsetId == null || recordsetId.isEmpty()) {
            throw new IllegalArgumentException();
        }
        HttpRequest request = buildDelete("v2/zones/" + zoneId + "/recordsets/" + recordsetId);
        doStringRequest(request);
    }
View Full Code Here

    public OpenstackKeystoreClient(HttpClient httpClient, URI uri, TokenProvider tokenProvider) {
        super(httpClient, uri, tokenProvider);
    }

    public List<Secret> listSecrets() throws RestClientException {
        HttpRequest request = buildGet("secrets");
        SecretList secrets = doRequest(request, SecretList.class);
        return secrets.secrets;
    }
View Full Code Here

        SecretList secrets = doRequest(request, SecretList.class);
        return secrets.secrets;
    }

    public Secret findSecret(String id) throws RestClientException {
        HttpRequest request = buildGet("secrets/" + id);
        return doRequest(request, Secret.class);
    }
View Full Code Here

        HttpRequest request = buildGet("secrets/" + id);
        return doRequest(request, Secret.class);
    }

    public byte[] getSecret(String id, String key) throws RestClientException {
        HttpRequest request = buildGet("secrets/" + id + "/" + key);
        return doByteArrayRequest(request);
    }
View Full Code Here

        }
        return ret;
    }

    private String doGet(String relativePath) throws RestClientException {
        HttpRequest request = buildGet(relativePath);
        return doStringRequest(request);
    }
View Full Code Here

    }

    protected HttpRequest buildGet(String relativePath) throws RestClientException {
        URI uri = resolve(relativePath);

        HttpRequest request = httpConfiguration.buildRequest(HttpMethod.GET, uri);
        addHeaders(request);
        return request;
    }
View Full Code Here

TOP

Related Classes of io.fathom.http.HttpRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.