Examples of buildRequest()


Examples of com.google.api.client.http.HttpRequestFactory.buildRequest()

   * @throws IOException I/O exception
   */
  public final OAuthCredentialsResponse execute() throws IOException {
    HttpRequestFactory requestFactory = transport.createRequestFactory();
    HttpRequest request =
        requestFactory.buildRequest(usePost ? HttpMethod.POST : HttpMethod.GET, this, null);
    createParameters().intercept(request);
    HttpResponse response = request.execute();
    response.setContentLoggingLimit(0);
    OAuthCredentialsResponse oauthResponse = new OAuthCredentialsResponse();
    UrlEncodedParser.parse(response.parseAsString(), oauthResponse);
View Full Code Here

Examples of com.subgraph.vega.http.requests.builder.HttpRequestBuilder.buildRequest()

  @Override
  public HttpUriRequest createRequest(IHttpMacroContext context) throws UnsupportedEncodingException, URISyntaxException {
    final HttpRequestBuilder builder = new HttpRequestBuilder();
    setRequestBuilder(builder, context);
    return builder.buildRequest(false);
  }

  @Override
  public void setRequestBuilder(IHttpRequestBuilder requestBuilder, IHttpMacroContext context) throws UnsupportedEncodingException, URISyntaxException {
    activate(ActivationPurpose.READ);
View Full Code Here

Examples of io.fathom.http.HttpClient.buildRequest()

        // Fetch the root page; this warms-up the app
        try {
            HttpClient httpClient = JreHttpClient.create();
            URI uri = URI.create("http://127.0.0.1:8080/");
            HttpRequest httpRequest = httpClient.buildRequest(HttpMethod.GET, uri);
            try (HttpResponse response = httpRequest.doRequest()) {
                if (response.getHttpResponseCode() != 200) {
                    throw new IllegalStateException("Bad response code from page: " + response.getHttpResponseCode());
                }
            }
View Full Code Here

Examples of org.jboss.as.cli.CommandContext.buildRequest()

        try {
            ctx.connectController();

            // Add the mod_cluster extension first (not in this profile by default)
            ModelNode request = ctx.buildRequest("/extension=org.jboss.as.modcluster:add");
            ModelNode response = controllerClient.execute(request);
            String outcome = response.get("outcome").asString();
            Assert.assertEquals("Adding mod_cluster extension failed! " + request.toJSONString(false), "success", outcome);

            // Now lets execute subsystem add operation but we need to specify a connector
View Full Code Here

Examples of org.jboss.as.cli.OperationCommand.buildRequest()

        final String operation = this.operation.getValue(ctx.getParsedCommandLine());
        final OperationCommand opHandler = getHandler(ctx, operation);
        if(opHandler == null) {
            throw new CommandFormatException("Unexpected command '" + operation + "'");
        }
        return opHandler.buildRequest(ctx);
    }

    @Override
    protected void handleResponse(CommandContext ctx, ModelNode opResponse, boolean composite) throws CommandFormatException {
        //System.out.println(opResponse);
View Full Code Here

Examples of org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.buildRequest()

        DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
        ModelNode request;
        try {
            builder.setOperationName("read-children-names");
            builder.addProperty("child-type", "deployment");
            request = builder.buildRequest();
        } catch (OperationFormatException e) {
            throw new IllegalStateException("Failed to build operation", e);
        }

        try {
View Full Code Here

Examples of org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.buildRequest()

        builder = new DefaultOperationRequestBuilder();
        builder.addNode("deployment", name);
        builder.setOperationName("read-attribute");
        builder.addProperty("name", "enabled");
        try {
            request = builder.buildRequest();
        } catch (OperationFormatException e) {
            throw new IllegalStateException("Failed to build operation", e);
        }

        try {
View Full Code Here

Examples of org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.buildRequest()

            ModelNode request;
            try {
                builder.setOperationName("read-children-names");
                builder.addNode("server-group", serverGroup);
                builder.addProperty("child-type", "deployment");
                request = builder.buildRequest();
            } catch (OperationFormatException e) {
                throw new IllegalStateException("Failed to build operation", e);
            }

            try {
View Full Code Here

Examples of org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.buildRequest()

            builder.addNode("server-group", serverGroup);
            builder.addNode("deployment", deploymentName);
            builder.setOperationName("read-attribute");
            builder.addProperty("name", "enabled");
            try {
                request = builder.buildRequest();
            } catch (OperationFormatException e) {
                throw new IllegalStateException("Failed to build operation", e);
            }

            try {
View Full Code Here

Examples of org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.buildRequest()

            ModelNode request;
            try {
                builder.setOperationName("read-children-names");
                builder.addNode("server-group", serverGroup);
                builder.addProperty("child-type", "deployment");
                request = builder.buildRequest();
            } catch (OperationFormatException e) {
                throw new IllegalStateException("Failed to build operation", e);
            }

            try {
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.