Jersey - How to set Cookie in REST API Response
You are here: Home > Frameworks > Jersey > Cookie in Response Jersey – How to set Cookie in REST API Response In this example, we will learn to set cookies into HTTP responses sent by Jersey REST APIs. This example makes use of javax.ws.rs.core.Response for setting cookies into REST responses sent to REST clients. Set Cookie Syntax To set a cookie in REST API response, get the Response cookie() method. @GET @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response getAllEployees() { Employees list = new Employees(); list.setEmployeeList(new ArrayListRead full article from Jersey - How to set Cookie in REST API Response
No comments:
Post a Comment