Tuesday, January 8, 2013

rest proxy

The best way to handle proxy issue in rest

Try the code

    @GET
    @Path("/dilip")
    @Produces({ MediaType.APPLICATION_JSON})
    public Response findById(anything)  {
         JSONObject obj=new JSONObject();
         obj.put("hello", "helloWorld");
         return Response.ok(obj).header("Access-Control-Allow-Origin", "*").build();
    }


No comments:

Post a Comment