- java.lang.Object
-
- com.github.mizosoft.methanol.internal.util.Http
-
public class Http extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisHeuristicallyCacheable(int statusCode)Returns whether a response with the given code can be cached based on heuristic expiry in case explicit expiry is absent.static booleanisIdempotent(java.lang.String method)Returns whether the given request method is idempotent, and hence may be retried multiple times.static booleanisSafe(java.lang.String method)Returns whether the given request method is unsafe, and hence may invalidate cached entries.
-
-
-
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.
-
-