use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method typedArrays.
@POST
@Path("typed-arrays")
@Produces(MediaType.APPLICATION_JSON)
public Response typedArrays(String request) {
SimpleResult result = new SimpleResult();
BasicDBObject response = (BasicDBObject) JSON.parse(request);
result.setResult(response.toJson());
return Response.ok(result).build();
}
use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method patch.
@PATCH
@Path("patch")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response patch(Client client) {
SimpleResult result = new SimpleResult();
result.setResult(client.getId() + client.getName() + client.getEmail());
return Response.ok(result).build();
}
use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method cookie.
@GET
@Path("cookie")
@Produces(MediaType.APPLICATION_JSON)
public Response cookie(@CookieParam(Default.COOKIE_NAME) String cookie) {
SimpleResult result = new SimpleResult();
result.setResult(cookie);
return Response.ok(result).build();
}
use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method form.
@POST
@Path("form")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.APPLICATION_JSON)
public Response form(@FormParam("id") int id, @FormParam("name") String name, @FormParam("email") String email) {
SimpleResult result = new SimpleResult();
result.setResult(id + name + email);
return Response.ok(result).build();
}
use of ru.sbtqa.tag.api.dto.SimpleResult in project page-factory-2 by sbtqa.
the class ClientJsonEndpoint method requestFromFeature2.
@POST
@Path("request-from-feature-2")
@Produces(MediaType.APPLICATION_JSON)
public Response requestFromFeature2(@QueryParam("q2") String query1, @QueryParam("query-parameter-value-1") String query2, @HeaderParam("h") String header1, @HeaderParam("Content-Type") String header2, Client client) {
SimpleResult result = new SimpleResult();
result.setResult(String.format("q1=%s|q2=%s|h1=%s|h2=%s|id=%s|name=%s|email=%s|", query1, query2, header1, header2, client.getId(), client.getName(), client.getEmail()));
return Response.ok(result).header(Default.HEADER_PARAMETER_NAME_1, header1).header(Default.HEADER_PARAMETER_NAME_2, header2).build();
}
Aggregations