Examples of post()


Examples of org.sonar.wsclient.internal.HttpRequestFactory.post()

  }

  @Test
  public void return_result_before_timeout_of_synchronous_migration() {
    HttpRequestFactory requestFactory = mock(HttpRequestFactory.class);
    when(requestFactory.post(eq("/api/server/setup"), anyMap())).thenReturn(
      RUNNING_JSON, DONE_JSON
    );

    DefaultSystemClient client = new DefaultSystemClient(requestFactory);
    Migration migration = client.migrate(500L, 5L);
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PlexusResource.post()

    userResource.addRole("admin");

    // try
    // {

    resource.post(null, this.buildRequest(), null, resourceRequest);
    // }
    // catch ( PlexusResourceException e )
    // {
    // ErrorResponse errorResponse = (ErrorResponse) e.getResultObject();
    // ErrorMessage errorMessage = (ErrorMessage) errorResponse.getErrors().get( 0 );
View Full Code Here

Examples of org.syncany.config.LocalEventBus.post()

    // Create large file, then wait 3sec for the settlement timer and
    // send the CLI request at the same time   
    clientA.createNewFile("largefile", 10*1024*1024);
    Thread.sleep(3000); // Settlement in Watcher!
   
    localEventBus.post(cliStatusRequest);
   
    // Then, let's hope the response is "no, no, no!"
    Response response = waitForResponse(2586);
   
    assertTrue(response instanceof StatusFolderResponse);
View Full Code Here

Examples of org.vertx.java.core.http.HttpClient.post()

                            return;
                        }

                        HttpClient client = getVertx().createHttpClient().setSSL(true).setHost("verifier.login.persona.org").setPort(443);

                        HttpClientRequest clientRequest = client.post("/verify", new Handler<HttpClientResponse>() {
                            public void handle(HttpClientResponse response) {
                                // error handler
                                response.exceptionHandler(new Handler<Throwable>() {
                                    @Override
                                    public void handle(Throwable err) {
View Full Code Here

Examples of org.vertx.java.core.http.RouteMatcher.post()

      public void handle(HttpServerRequest request) {
        request.response.end("This is the SpringOne Push Messaging Service");
      }
    });
   
    matcher.post("/messages/:topic/", new Handler<HttpServerRequest>() {
      public void handle(final HttpServerRequest request) {
        final String topic = request.params().get("topic");
        request.bodyHandler(new Handler<Buffer>(){
          public void handle(Buffer body) {
            JsonObject message =
View Full Code Here

Examples of org.zanata.apicompat.rest.client.ISourceDocResource.post()

        ISourceDocResource sourceDocClient =
                super.createProxy(createClientProxyFactory(ADMIN, ADMIN_KEY),
                        ISourceDocResource.class,
                        "/projects/p/sample-project/iterations/i/1.0/r/");
        ClientResponse<String> response =
                sourceDocClient.post(res, new StringSet(PoHeader.ID + ";"
                        + SimpleComment.ID), true);

        assertThat(response.getStatus(), is(Status.CREATED.getStatusCode())); // 201
        response.releaseConnection();
View Full Code Here

Examples of play.libs.WS.WSRequest.post()

                         .setParameter("grant_type", "authorization_code")
                         .setParameter("code", code)
                         .setParameter("client_id", CLIENT_ID)
                         .setParameter("client_secret", CLIENT_SECRET);

        HttpResponse resp = ws.post();
        if (resp.success()) {
            return new Gson().fromJson(resp.getJson(), BoxCredentials.class);
        }

        throw new IllegalStateException("Failed fetching box account credentials. Status: " + resp.getStatus() +
View Full Code Here

Examples of play.libs.ws.WSRequestHolder.post()

        wrh.setHeader(CONTENT_TYPE, "application/x-www-form-urlencoded");
        for(final Map.Entry<String, String> header : getHeaders().entrySet()) {
            wrh.setHeader(header.getKey(), header.getValue());
        }

    final WSResponse r = wrh.post(params).get(PlayAuthenticate.TIMEOUT);

    return buildInfo(r);
  }

  protected abstract I buildInfo(final WSResponse r)
View Full Code Here

Examples of ratpack.manual.snippets.fixture.SnippetFixture.post()

    String imports = importsAndSnippet.get(0);
    String snippetMinusImports = importsAndSnippet.get(1);

    SnippetFixture fixture = snippet.getFixture();
    String fullSnippet = imports + fixture.pre() + snippetMinusImports + fixture.post();


    Script script;
    try {
      script = groovyShell.parse(fullSnippet, snippet.getClassName());
View Full Code Here

Examples of solver.Solver.post()

            if (VAR.hasEnumeratedDomain()) {
                ov = enumerated(name, lb, ub, s);
            } else {
                ov = bounded(name, lb, ub, s);
            }
            s.post(ICF.arithm(ov, "-", VAR, "=", CSTE));
            return ov;
        }
    }

    /**
 
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.