Package com.netflix.client.http

Examples of com.netflix.client.http.HttpRequest


            for (String value : values) {
                builder.queryParams(name, value);
            }
        }

        HttpRequest httpClientRequest = builder.build();

        HttpResponse response = restClient.executeWithLoadBalancer(httpClientRequest);
        context.set("ribbonResponse", response);
        return response;
    }
View Full Code Here


            for (String value : values) {
                builder.queryParams(name, value);
            }
        }

        HttpRequest httpClientRequest = builder.build();

        HttpResponse response = restClient.executeWithLoadBalancer(httpClientRequest);
        context.set("ribbonResponse", response);
        return response;
    }
View Full Code Here

            for (String value : values) {
                builder.queryParams(name, value);
            }
        }

        HttpRequest httpClientRequest = builder.build();

        HttpResponse response = restClient.executeWithLoadBalancer(httpClientRequest);
        context.setZuulResponse(response);
        return response;
    }
View Full Code Here

    }

    private Job forwardJobKill(final String killURI) throws GenieException {
        try {
            final BaseGenieClient client = new BaseGenieClient(null);
            final HttpRequest request = BaseGenieClient.buildRequest(Verb.DELETE, killURI, null, null);
            return (Job) client.executeRequest(request, null, Job.class);
        } catch (final IOException ioe) {
            throw new GenieServerException(ioe.getMessage(), ioe);
        }
    }
View Full Code Here

    private Job forwardJobRequest(
            final String hostURI,
            final Job job) throws GenieException {
        try {
            final BaseGenieClient client = new BaseGenieClient(null);
            final HttpRequest request = BaseGenieClient.buildRequest(Verb.POST, hostURI, null, job);
            return (Job) client.executeRequest(request, null, Job.class);
        } catch (final IOException ioe) {
            throw new GenieServerException(ioe.getMessage(), ioe);
        }
    }
View Full Code Here

    public Job submitJob(final Job job) throws GenieException {
        if (job == null) {
            throw new GeniePreconditionException("No job entered to validate");
        }
        job.validate();
        final HttpRequest request = BaseGenieClient.buildRequest(
                Verb.POST,
                BASE_EXECUTION_REST_URL,
                null,
                job);
        return (Job) this.executeRequest(request, null, Job.class);
View Full Code Here

    public Job getJob(final String id) throws GenieException {
        if (StringUtils.isBlank(id)) {
            throw new GeniePreconditionException("Missing required parameter: id");
        }

        final HttpRequest request = BaseGenieClient.buildRequest(
                Verb.GET,
                StringUtils.join(
                        new String[]{BASE_EXECUTION_REST_URL, id},
                        SLASH),
                null,
View Full Code Here

     *               GitHub.
     * @return List of jobs that match the filter
     * @throws GenieException For any other error.
     */
    public List<Job> getJobs(final Multimap<String, String> params) throws GenieException {
        final HttpRequest request = BaseGenieClient.buildRequest(
                Verb.GET,
                BASE_EXECUTION_REST_URL,
                params,
                null);

View Full Code Here

            throw new GeniePreconditionException("Missing required parameter: id");
        }

        // this assumes that the service will forward the delete to the right
        // instance
        final HttpRequest request = BaseGenieClient.buildRequest(
                Verb.DELETE,
                StringUtils.join(
                        new String[]{BASE_EXECUTION_REST_URL, id},
                        SLASH),
                null,
View Full Code Here

        }
        if (tags == null || tags.isEmpty()) {
            throw new GeniePreconditionException("Missing required parameter: tags");
        }

        final HttpRequest request = BaseGenieClient.buildRequest(
                Verb.POST,
                StringUtils.join(
                        new String[]{BASE_EXECUTION_REST_URL, id, "tags"},
                        SLASH),
                null,
View Full Code Here

TOP

Related Classes of com.netflix.client.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.