Package com.metamx.http.client.response

Examples of com.metamx.http.client.response.FullResponseHolder


      String url = getRuleURL();
      if (url == null) {
        return;
      }

      FullResponseHolder response = httpClient.get(new URL(url))
                                              .go(responseHandler)
                                              .get();

      if (response.getStatus().equals(HttpResponseStatus.FOUND)) {
        url = response.getResponse().getHeader("Location");
        log.info("Redirecting rule request to [%s]", url);
        response = httpClient.get(new URL(url))
                             .go(responseHandler)
                             .get();
      }

      ConcurrentHashMap<String, List<Rule>> newRules = new ConcurrentHashMap<>(
          (Map<String, List<Rule>>) jsonMapper.readValue(
              response.getContent(), new TypeReference<Map<String, List<Rule>>>()
          {
          }
          )
      );
View Full Code Here

TOP

Related Classes of com.metamx.http.client.response.FullResponseHolder

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.