@GET @Produces(MediaType.APPLICATION_JSON) public Response getUsuarios(@PathParam("id") String id) throws MyException { List<Civica> civicas = new ArrayList<Civica>(); civicas = civicaDAO.leerTodos(); return Response.ok() // 200 .entity(civicas) .header("Access-Control-Allow-Origin", "*") .header("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT") .build(); }