Examples of HttpClientBuilder


Examples of org.geowebcache.util.HttpClientBuilder

        if (log.isDebugEnabled()) {
            log.debug("Creating GeoRSS reader for URL " + url.toExternalForm() + " with user "
                    + username);
        }

        HttpClientBuilder builder = new HttpClientBuilder();
        builder.setHttpCredentials(username, password, url);
        builder.setBackendTimeout(120);

        HttpClient httpClient = builder.buildClient();

        GetMethod getMethod = new GetMethod(url.toString());
        if (builder.isDoAuthentication()) {
            getMethod.setDoAuthentication(true);
            httpClient.getParams().setAuthenticationPreemptive(true);
        }

        if (log.isDebugEnabled()) {
View Full Code Here

Examples of org.keycloak.adapters.HttpClientBuilder

        }
    }

    public static List<String> getProducts(HttpServletRequest req) throws Failure {
        KeycloakSecurityContext session = (KeycloakSecurityContext)req.getAttribute(KeycloakSecurityContext.class.getName());
        HttpClient client = new HttpClientBuilder()
                .disableTrustManager().build();
        try {
            HttpGet get = new HttpGet(AdapterUtils.getOrigin(req.getRequestURL().toString(), session) + "/database/products");
            get.addHeader("Authorization", "Bearer " + session.getTokenString());
            try {
View Full Code Here

Examples of org.keycloak.services.util.HttpClientBuilder

public class ResourceAdminManager {
    protected static Logger logger = Logger.getLogger(ResourceAdminManager.class);
    private static final String APPLICATION_SESSION_HOST_PROPERTY = "${application.session.host}";

    public static ApacheHttpClient4Executor createExecutor() {
        HttpClient client = new HttpClientBuilder()
                .disableTrustManager() // todo fix this, should have a trust manager or a good default
                .build();
        return new ApacheHttpClient4Executor(client);
    }
View Full Code Here

Examples of smartrics.rest.fitnesse.fixture.support.HttpClientBuilder

     * @param config
     *            the configuration for the rest client to build
     * @return the rest client
     */
    public RestClient buildRestClient(final Config config) {
        HttpClient httpClient = new HttpClientBuilder().createHttpClient(config);
        return new RestClientImpl(httpClient) {
            @Override
            protected URI createUri(String uriString, boolean escaped) throws URIException {
                boolean useNewHttpUriFactory = config.getAsBoolean("http.client.use.new.http.uri.factory", false);
                if (useNewHttpUriFactory) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.