Examples of post()


Examples of javax.ws.rs.client.SyncInvoker.post()

        Entity entity = Entity.entity("entity", MediaType.WILDCARD_TYPE);

        WebTarget target = target("resource");
        SyncInvoker sync = target.request();

        Response response = sync.post(entity, generic);
        Assert.assertEquals(200, response.getStatus());
        Assert.assertEquals("entity", response.readEntity(String.class));
    }

    @Test
View Full Code Here

Examples of net.engio.mbassy.bus.MBassador.post()

        TestUtil.setup(bus, listeners, 10);

        TestMessage message = new TestMessage();
        TestMessage subTestMessage = new SubTestMessage();

        bus.post(message).now();
        bus.post(subTestMessage).now();

        assertEquals(100, message.counter.get());
        assertEquals(0, subTestMessage.counter.get());
        assertEquals(100, FilteredEventCounter.get());
View Full Code Here

Examples of net.engio.mbassy.bus.common.GenericMessagePublicationSupport.post()

            @Override
            public void run() {
                StandardMessage standardMessage = new StandardMessage();
                MultipartMessage multipartMessage = new MultipartMessage();

                bus.post(standardMessage).now();
                bus.post(multipartMessage).now();
                bus.post(MessageTypes.Simple).now();
                bus.post(MessageTypes.Multipart).now();

                assertEquals(InstancesPerListener, standardMessage.getTimesHandled(IMessageListener.DefaultListener.class));
View Full Code Here

Examples of net.engio.mbassy.bus.common.IMessageBus.post()

            bus.subscribe(handler);
        }

        MessagePublication publication = null;
        for(int i = 0; i < numberOfMessages; i++){
           publication =  bus.post(new Object()).asynchronously();
        }
        // wait for last publication
        while (!publication.isFinished()){
            pause(100);
        }
View Full Code Here

Examples of net.sourceforge.processdash.util.ClientHttpRequest.post()

        maybeSetParameter(request, EXTRA_INFO_PARAM, userName);
        maybeSetParameter(request, USER_ID_PARAM, userId);
        maybeSetParameter(request, SOURCE_IDENTIFIER, sourceIdentifier);
        maybeSetParameter(request, EXTRA_LOCK_DATA, extraLockData);
        try {
            InputStream in = request.post(params);
            if (responseAnalyzer != null)
                responseAnalyzer.analyze(request.getConnection());
            return FileUtils.slurpContents(in, true);
        } catch (IOException ioe) {
            checkForLockException(request.getConnection());
View Full Code Here

Examples of net.thegreshams.firebase4j.service.Firebase.post()

    System.out.println( "\n\nResult of GET (for the test-PUT):\n" + response );
    System.out.println("\n");
   
   
    // "POST" (test-map into a sub-node off of the fb4jDemo-root)
    response = firebase.post( "test-POST", dataMap );
    System.out.println( "\n\nResult of POST (for the test-POST):\n" + response );
    System.out.println("\n");
   
   
    // "DELETE" (it's own test-node)
View Full Code Here

Examples of net.yacy.cora.protocol.http.HTTPClient.POST()

            if(body == null) {
                log.logSevere("no body to POST!");
            }
            try {
              // sending the request
              client.POST(getUrl, body, contentLength);
              if (log.isFinest()) log.logFinest(reqID +"    response status: "+ client.getHttpResponse().getStatusLine());
             
              final ResponseHeader responseHeader = new ResponseHeader(client.getHttpResponse().getAllHeaders());
              // determine if it's an internal error of the httpc
              if (responseHeader.isEmpty()) {
View Full Code Here

Examples of org.apache.abdera.protocol.client.AbderaClient.post()

      StringRequestEntity stringreq = new StringRequestEntity(
        f.toString(),"application/x-www-form-urlencoded","utf-8");
      String uri = "https://www.google.com/accounts/ClientLogin";
      RequestOptions options = abderaClient.getDefaultRequestOptions();
      options.setContentType("application/x-www-form-urlencoded");
      ClientResponse response = abderaClient.post(uri, stringreq, options);
      InputStream in = response.getInputStream();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      int n = -1;
      while ((n = in.read()) != -1) { out.write(n); }
      out.flush();
View Full Code Here

Examples of org.apache.abdera.protocol.client.Client.post()

        URLEncoder.encode(Version.APP_NAME, "utf-8"));
      StringRequestEntity stringreq = new StringRequestEntity(f.toString());
      String uri = "https://www.google.com/accounts/ClientLogin";
      RequestOptions options = client.getDefaultRequestOptions();
      options.setContentType("application/x-www-form-urlencoded");
      ClientResponse response = client.post(uri, stringreq, options);
      InputStream in = response.getInputStream();
      ByteArrayOutputStream out = new ByteArrayOutputStream();
      int n = -1;
      while ((n = in.read()) != -1) { out.write(n); }
      out.flush();
View Full Code Here

Examples of org.apache.abdera.protocol.client.CommonsClient.post()

    // Verify the signature with Verisign's "Signed Ping" interop endpoint
    Client client = new CommonsClient();
    RequestOptions reqoptions = client.getDefaultRequestOptions();
    reqoptions.setContentType("application/xml");
    BaseRequestEntity bre = new BaseRequestEntity(entry,false);
    ClientResponse response = client.post(
      "http://verisignlabs.com/tg/verify",
      bre, reqoptions);
    assertEquals(response.getStatus(),200);
    Document<Element> result = response.getDocument();
   
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.