Examples of doGET()


Examples of net.sf.jpluck.http.HttpClient.doGet()

    byte[] data = null;
    if (html.startsWith("http://")) {
      System.out.println("Downloading " + html);
      HttpClient httpClient = new HttpClient();
      HttpResponse response = httpClient.doGet(html);
      data = response.getContent();     
    } else {
      File file = new File(html);
      System.out.println("Reading " + file.getAbsolutePath());
      data = new byte[(int)file.length()];
View Full Code Here

Examples of net.sf.jpluck.http.HttpClient.doGet()

        public void run() {
            try {
                HttpClient client = new HttpClient();
                String filename = convertToFilename(name);
                HttpResponse response = client.doGet(rootPath + "/" + filename);
                if (response.getStatusCode() == 200) {
                    byte[] data = response.getContent();
                    if (!JPluckX.getInstance().isWebStart()) {
                        FileOutputStream out = new FileOutputStream(new File(dir, filename));
                        out.write(data);
View Full Code Here

Examples of net.sf.jpluck.http.HttpClient.doGet()

      HttpResponse response;
      if (Spider.isOffline()) {
        response = cached;
        logger.info(response.getStatusCode() + " " + response.getStatusMessage() + ": " + uri);
      } else {
        response = httpClient.doGet(uri, ifModifiedSince, spider.cookieStore);
        logger.info(response.getStatusCode() + " " + response.getStatusMessage() + ": " + uri);
        if (response.getStatusCode() == 304) {
          response = cached;
        }
      }
View Full Code Here

Examples of net.sf.jpluck.http.HttpClient.doGet()

    public void run() {
        HttpClient httpClient = new HttpClient();
        try {
            httpClient.addHttpListener(this);
            HttpResponse response = httpClient.doGet(url);
            if (isVisible()) {
                this.response = response;
            }
        } catch (Exception e) {
            exception = e;
View Full Code Here

Examples of net.sf.jpluck.http.HttpClient.doGet()

                        jxls += ("jxl" + i + "=" + URLEncoder.encode(file.getAbsolutePath(), "ISO-8859-1"));
                        if (i < (args.length - 1)) {
                            jxls += "&";
                        }
                    }
                    httpClient.doGet("http://127.0.0.1:9126/activate?" + jxls);
                } catch (Exception e2) {
                }
                System.exit(ExitCodes.OK);
            }
View Full Code Here

Examples of org.apache.cactus.sample.servlet.SampleServlet.doGet()

     *
     * @param theResponse the response from the server side.
     */
    public void testSampleServletResponse() throws Exception {
        SampleServlet servlet = new SampleServlet();
        servlet.doGet(request, response);
    }
   
    /**
     * Verify that we can assert the servlet output stream.
     *
 
View Full Code Here

Examples of org.apache.cocoon.rest.controller.method.Get.doGet()

        @Override
        public RestResponse execute(Object controller) throws Exception {
            if (controller instanceof Get) {
                Get get = (Get) controller;
                return get.doGet();
            }
            return super.execute(controller);
        }
    }
View Full Code Here

Examples of org.apache.cocoon.rest.controller.method.Get.doGet()

        @Override
        public RestResponse execute(Object controller) throws Exception {
            if (controller instanceof Get) {
                Get get = (Get) controller;
                return get.doGet();
            }
            return super.execute(controller);
        }
    }
View Full Code Here

Examples of org.apache.hadoop.gateway.dispatch.HttpClientDispatch.doGet()

    HttpServletResponse outboundResponse = EasyMock.createNiceMock( HttpServletResponse.class );
    EasyMock.replay( outboundResponse );

    HttpClientDispatch dispatch = new HttpClientDispatch();
    try {
      dispatch.doGet( new URI( uri ), inboundRequest, outboundResponse );
      fail( "Expected exception while accessing to unreachable host" );
    } catch ( IOException e ) {
      Iterator<LoggingEvent> iterator = CollectAppender.queue.iterator();
      LoggingEvent failureEvent = iterator.next();
      verifyValue( (String) failureEvent.getMDC( AuditConstants.MDC_RESOURCE_NAME_KEY ), uri );
View Full Code Here

Examples of org.apache.hadoop.gateway.dispatch.HttpClientDispatch.doGet()

    HttpServletResponse outboundResponse = EasyMock.createNiceMock( HttpServletResponse.class );
    EasyMock.replay( outboundResponse );

    HttpClientDispatch dispatch = new HttpClientDispatch();
    try {
      dispatch.doGet( new URI( uri ), inboundRequest, outboundResponse );
      fail( "Expected exception while accessing to unreachable host" );
    } catch ( IOException e ) {
      Iterator<LoggingEvent> iterator = CollectAppender.queue.iterator();
      LoggingEvent failureEvent = iterator.next();
      verifyValue( (String) failureEvent.getMDC( AuditConstants.MDC_RESOURCE_NAME_KEY ), uri );
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.