Package org.apache.http.client.methods

Examples of org.apache.http.client.methods.HttpGet


    requestString += "&BBOX=" + requestBounds.toString() + ",EPSG:4326";
    HttpClient httpclient = ogpHttpClient.getHttpClient();
    File outputFile = null;
   
      String wfsLocation = ParseJSONSolrLocationField.getWfsUrl(layerInfo.getLocation());
        HttpGet httpget = new HttpGet(wfsLocation + "?" + requestString);

        logger.info("executing request " + httpget.getURI());
       
    try {
      HttpResponse response = httpclient.execute(httpget);
      logger.info("Response code: " + Integer.toString(response.getStatusLine().getStatusCode()));
      if (response.getStatusLine().getStatusCode() != 200){
View Full Code Here


    }*/
    logger.debug("about to send url: " + url);
    HttpClient httpclient = ogpHttpClient.getHttpClient();
    InputStream replyStream = null;
    try {
      HttpGet httpget = new HttpGet(url);
     
      logger.info("executing get request " + httpget.getURI());

      HttpResponse response = httpclient.execute(httpget);
      this.setStatus(response.getStatusLine().getStatusCode());
      this.setHeaders(response.getAllHeaders());
      HttpEntity entity = response.getEntity();
View Full Code Here

 
  public void abstractRequest(HttpServletRequest request, HttpServletResponse response, String remoteUrl, String action){
    HttpClient httpclient = ogpHttpClient.getHttpClient();
    try {

      HttpGet internalRequest = new HttpGet(remoteUrl);
      HttpResponse internalResponse = httpclient.execute(internalRequest);

      this.checkStatus(internalResponse, response);

      if (action.equalsIgnoreCase("copy")){
View Full Code Here

      localcontext.setAttribute(ClientContext.AUTH_CACHE, authCache);
    }
   
    try {

      HttpGet internalRequest = new HttpGet(remoteAddress);
      HttpResponse internalResponse = httpclient.execute(internalRequest);
      //internalResponse.getEntity().getContent()
      // copy headers
      //this.copyHeaders(internalResponse, response);
View Full Code Here

            });
            HostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;
            sslsf.setHostnameVerifier((X509HostnameVerifier) hostnameVerifier);
            for (String connectstring : getConnectorStrings("https_proxy")) {
                HttpGet request = new HttpGet(connectstring + "/proxy/reload");


                HttpClient httpClient = new org.apache.http.impl.client.DefaultHttpClient();
                String[] parts = connectstring.split(":");
                httpClient.getConnectionManager().getSchemeRegistry().register(new org.apache.http.conn.scheme.Scheme("https", Integer.parseInt(parts[parts.length - 1]), sslsf));
View Full Code Here

          for(String value : param.getValues())
            builder.addParameter(param.getName(), value);

      URI requestURI = builder.build();
      uri = requestURI.toString();
      return new HttpGet(requestURI);
    }
    catch(URISyntaxException e) {
      throw MechanizeExceptionFactory.newException(e);
    }
  }
View Full Code Here

                final CloseableHttpAsyncClient httpClient = HttpAsyncClients.custom()
                        .setDefaultCredentialsProvider(credentialsProvider)
                        .build();

                HttpGet get = new HttpGet(endpoint.getUri());
                HttpHost target = URIUtils.extractHost(get.getURI());
                BasicAsyncRequestProducer basicAsyncRequestProducer = new BasicAsyncRequestProducer(target, get);
                httpClient.start();
                try {
                    log.debug("sending request");
                    Future<HttpResponse> futureResponse = httpClient.execute(
View Full Code Here

    }
   
    @BeforeClass
    public static void setup() {
        client = new DefaultHttpClient();
        final HttpUriRequest get = new HttpGet(baseUrl);
        System.setProperty("http.port", String.valueOf(port));
        System.setProperty("osgi.storage.path", getOsgiStoragePath());
       
        final InputStream is = CrankstartBootstrapTest.class.getResourceAsStream(TEST_RESOURCE);
        assertNotNull("Expecting test resource to be found:" + TEST_RESOURCE, is);
View Full Code Here

    }
   
    @Test
    @Retry(timeoutMsec=10000, intervalMsec=250)
    public void testHttpRoot() throws Exception {
        final HttpUriRequest get = new HttpGet(baseUrl);
        HttpResponse response = null;
        try {
            response = client.execute(get);
            assertEquals("Expecting page not found at " + get.getURI(), 404, response.getStatusLine().getStatusCode());
        } finally {
            closeConnection(response);
        }
    }
View Full Code Here

    }
   
    @Test
    @Retry(timeoutMsec=10000, intervalMsec=250)
    public void testSingleConfigServlet() throws Exception {
        final HttpUriRequest get = new HttpGet(baseUrl + "/single");
        HttpResponse response = null;
        try {
            response = client.execute(get);
            assertEquals("Expecting success for " + get.getURI(), 200, response.getStatusLine().getStatusCode());
        } finally {
            closeConnection(response);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.http.client.methods.HttpGet

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.