fixing REST API
This commit is contained in:
parent
12dad415c9
commit
181afe788d
|
@ -5,7 +5,7 @@ import javax.ws.rs.HEAD;
|
||||||
import javax.ws.rs.InternalServerErrorException;
|
import javax.ws.rs.InternalServerErrorException;
|
||||||
import javax.ws.rs.POST;
|
import javax.ws.rs.POST;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.core.MediaType;
|
||||||
import javax.ws.rs.core.Response;
|
import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.Response.Status;
|
import javax.ws.rs.core.Response.Status;
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ public class Software {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(Software.class);
|
private final Logger logger = LoggerFactory.getLogger(Software.class);
|
||||||
|
|
||||||
public static final String APPLICATION_JSON = "application/json";
|
public static final String APPLICATION_JSON_CHARSET_UTF_8 = MediaType.APPLICATION_JSON + ";charset=UTF-8";
|
||||||
|
|
||||||
@HEAD
|
@HEAD
|
||||||
public Response alive() {
|
public Response alive() {
|
||||||
|
@ -34,7 +34,7 @@ public class Software {
|
||||||
|
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Consumes(APPLICATION_JSON)
|
@Consumes(APPLICATION_JSON_CHARSET_UTF_8)
|
||||||
@StatusCodes ({
|
@StatusCodes ({
|
||||||
@ResponseCode ( code = 202, condition = "The provided json is formally correct.")
|
@ResponseCode ( code = 202, condition = "The provided json is formally correct.")
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue