Module methanol

Class Http


  • public class Http
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isHeuristicallyCacheable​(int statusCode)
      Returns whether a response with the given code can be cached based on heuristic expiry in case explicit expiry is absent.
      static boolean isIdempotent​(java.lang.String method)
      Returns whether the given request method is idempotent, and hence may be retried multiple times.
      static boolean isSafe​(java.lang.String method)
      Returns whether the given request method is unsafe, and hence may invalidate cached entries.
      • Methods inherited from class java.lang.Object

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

      • isHeuristicallyCacheable

        public static boolean isHeuristicallyCacheable​(int statusCode)
        Returns whether a response with the given code can be cached based on heuristic expiry in case explicit expiry is absent. Based on rfc7231 Section 6.1.
      • isSafe

        public static boolean isSafe​(java.lang.String method)
        Returns whether the given request method is unsafe, and hence may invalidate cached entries. Based on rfc7231 Section 4.2.1.
      • isIdempotent

        public static boolean isIdempotent​(java.lang.String method)
        Returns whether the given request method is idempotent, and hence may be retried multiple times. Based on rfc7231 Section 4.2.2.