Class Headers


  • public class Headers
    extends java.lang.Object
    Wrapper class for the internal HTTP headers class.
    • Constructor Summary

      Constructors 
      Constructor Description
      Headers​(okhttp3.Headers headers)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)
      Returns true if other is a Headers object with the same headers, with the same casing, in the same order.
      int hashCode()  
      java.util.Set<java.lang.String> names()
      Returns an immutable, case-insensitive set of header names.
      java.lang.String toString()  
      java.util.List<java.lang.String> values​(java.lang.String name)
      Returns an immutable list of the header values for the specified name.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Headers

        public Headers​(okhttp3.Headers headers)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
        Returns true if other is a Headers object with the same headers, with the same casing, in the same order.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        other - the other object to compare
        Returns:
        whether the two objects are equal or not
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • names

        public java.util.Set<java.lang.String> names()
        Returns an immutable, case-insensitive set of header names.
        Returns:
        the list of header names
      • values

        public java.util.List<java.lang.String> values​(java.lang.String name)
        Returns an immutable list of the header values for the specified name.
        Parameters:
        name - the name of the specified header
        Returns:
        the values associated with the name