use of jakarta.ws.rs.Produces in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method arrayResponse.
@POST
@Path("arrays-as-is")
@Produces(MediaType.APPLICATION_JSON)
public Response arrayResponse(String request) {
SimpleResult result = new SimpleResult();
BasicDBList response = (BasicDBList) JSON.parse(request);
result.setResult(response.toString());
return Response.ok(result).build();
}
use of jakarta.ws.rs.Produces in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method getWithParams.
@GET
@Path("get-with-params-placeholder")
@Produces(MediaType.APPLICATION_JSON)
public Response getWithParams(@HeaderParam(Default.HEADER_PARAMETER_NAME_1) String header1, @HeaderParam("header2") String header2, @QueryParam(Default.QUERY_PARAMETER_NAME_1) String query) {
SimpleResult result = new SimpleResult();
result.setResult(query + header1 + header2);
return Response.ok(result).build();
}
Aggregations