org.jsmart.simulator.enums.HttpMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of micro-simulator Show documentation
Show all versions of micro-simulator Show documentation
Simulates RESTFUL End Points for Micro Services.
The newest version!
package org.jsmart.simulator.enums;
/**
* This Enum was added to handle the Switch/Case as Java6 doesnt support String based switch/case.
* After switching to Java8, this class may not be no longer required.
*
* @author Siddha.
*/
public enum HttpMethod {
GET(0), POST(1), PUT(2), DELETE(3);
private int code;
private HttpMethod(int code) {
this.code = code;
}
public int getCode() {
return code;
}
public String toString() {
return String.valueOf(code);
}
}