Rabbit-R1/original r1/java/sources/okhttp3/internal/http/HttpMethod.java

44 lines
2.5 KiB
Java
Raw Normal View History

2024-05-21 16:08:36 -05:00
package okhttp3.internal.http;
import io.sentry.protocol.Request;
import kotlin.Metadata;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: HttpMethod.kt */
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u000e\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006J\u0010\u0010\u0007\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0007J\u000e\u0010\b\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006J\u000e\u0010\t\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006J\u0010\u0010\n\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0007¨\u0006\u000b"}, d2 = {"Lokhttp3/internal/http/HttpMethod;", "", "()V", "invalidatesCache", "", Request.JsonKeys.METHOD, "", "permitsRequestBody", "redirectsToGet", "redirectsWithBody", "requiresRequestBody", "okhttp"}, k = 1, mv = {1, 4, 0})
/* loaded from: classes3.dex */
public final class HttpMethod {
public static final HttpMethod INSTANCE = new HttpMethod();
private HttpMethod() {
}
public final boolean invalidatesCache(String method) {
Intrinsics.checkNotNullParameter(method, "method");
return Intrinsics.areEqual(method, "POST") || Intrinsics.areEqual(method, "PATCH") || Intrinsics.areEqual(method, "PUT") || Intrinsics.areEqual(method, "DELETE") || Intrinsics.areEqual(method, "MOVE");
}
@JvmStatic
public static final boolean requiresRequestBody(String method) {
Intrinsics.checkNotNullParameter(method, "method");
return Intrinsics.areEqual(method, "POST") || Intrinsics.areEqual(method, "PUT") || Intrinsics.areEqual(method, "PATCH") || Intrinsics.areEqual(method, "PROPPATCH") || Intrinsics.areEqual(method, "REPORT");
}
@JvmStatic
public static final boolean permitsRequestBody(String method) {
Intrinsics.checkNotNullParameter(method, "method");
return (Intrinsics.areEqual(method, "GET") || Intrinsics.areEqual(method, "HEAD")) ? false : true;
}
public final boolean redirectsWithBody(String method) {
Intrinsics.checkNotNullParameter(method, "method");
return Intrinsics.areEqual(method, "PROPFIND");
}
public final boolean redirectsToGet(String method) {
Intrinsics.checkNotNullParameter(method, "method");
return !Intrinsics.areEqual(method, "PROPFIND");
}
}