fr.alexpado.lib.rest.enums.RequestMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simple-http-client Show documentation
Show all versions of simple-http-client Show documentation
Simple wrapper for the Java 8 HTTP API (Depends on JDK11+).
package fr.alexpado.lib.rest.enums;
public enum RequestMethod {
GET(false),
POST(true),
PUT(true),
DELETE(true);
boolean outputSupported;
RequestMethod(boolean outputSupported) {
this.outputSupported = outputSupported;
}
/**
* Check if the current {@link RequestMethod} supports request body.
*
* @return True if a request body is supported, false otherwise.
*/
public boolean isOutputSupported() {
return outputSupported;
}
}