@GET
    @Path("updateContact")
    public Response updateContact(@QueryParam("id") int id,
                                  @QueryParam("firstName") String firstName,
                                  @QueryParam("lastName") String lastName,
                                  @QueryParam("phone") String phone) {
        WebResource contactResource =
                client.resource("http://localhost:8080/contact/" +
                        id+"/update");
        ClientResponse response = contactResource.type(MediaType.
                APPLICATION_JSON).post(ClientResponse.class, new Contact(id,
                firstName, lastName, phone));
        if (response.getStatus() == 200) {
// Created
            return Response.status(302).entity("The contact was updated successfully!").build();
        }
        else {
// Other Status code, indicates an error
            return Response.status(422).entity(response.
                    getEntity(String.class)).build();
        }
    }