Class CompatUtilities


  • public class CompatUtilities
    extends java.lang.Object
    A set of utility functions to assist in the migrations from AHC 1.9 to AHC 2.6 Created by Karel Maesen, Geovise BVBA on 2018-12-13.
    • Constructor Summary

      Constructors 
      Constructor Description
      CompatUtilities()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String bodyExcerpt​(org.asynchttpclient.Response response, int maxLength)  
      static java.lang.String bodyExcerpt​(org.asynchttpclient.Response response, int maxLength, java.lang.String charset)  
      static java.util.Map<java.lang.String,​java.util.List<java.lang.String>> headersToMap​(io.netty.handler.codec.http.HttpHeaders headers)
      Returns the headers as an immutable map
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CompatUtilities

        public CompatUtilities()
    • Method Detail

      • headersToMap

        public static java.util.Map<java.lang.String,​java.util.List<java.lang.String>> headersToMap​(io.netty.handler.codec.http.HttpHeaders headers)
        Returns the headers as an immutable map
        Parameters:
        headers -
        Returns:
      • bodyExcerpt

        public static java.lang.String bodyExcerpt​(org.asynchttpclient.Response response,
                                                   int maxLength)
      • bodyExcerpt

        public static java.lang.String bodyExcerpt​(org.asynchttpclient.Response response,
                                                   int maxLength,
                                                   java.lang.String charset)