de.sstoehr.harreader.model.HttpMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of har-reader Show documentation
Show all versions of har-reader Show documentation
A library to access HTTP archive format with Java
The newest version!
package de.sstoehr.harreader.model;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public enum HttpMethod {
GET, POST, PUT, HEAD, PROPFIND, OPTIONS, REPORT, DELETE, CONNECT, TRACE, CCM_POST, PATCH, UNKNOWN;
@Nonnull
public static HttpMethod fromString(@Nullable String method) {
if (method == null) {
return HttpMethod.UNKNOWN;
}
try {
return HttpMethod.valueOf(method.toUpperCase());
} catch (IllegalArgumentException e) {
return HttpMethod.UNKNOWN;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy