KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i am trying to have a REST service return a zip file from the local harddrive . Following is what i am doing , @Path("/interface3/{Ent_id}/{esf_app_id}/{esf_app_ver}") public class Interface3Mock { // This method is called if TEXT_PLAIN is request @GET @Produces("application/zip") public Response callInterface3_text( @PathParam("Ent_id") Integer entitlement_id, @PathParam("eapp_id") String eapp_id, @PathParam("eapp_ver") String eapp_ver) { File f = new File("D:\\Documentation\\Documentation.zip"); String mt = new MimetypesFileTypeMap().getContentType(f); return Response.ok(f, mt).build(); } } Now when i use the browser ie. Internet Explorer and key in the url http://localhost:9788/mockRESTServer/rest/interface3/123456/k123/l345 i see a file download dialog that says "Do you want to save the file l345`. i want it to ask me for the zip download ie. D:\\Documentation\\Documentation.zip . But somehow it takes up the last parameter in the request URL.
Tags (comma-separated)
Save Edits
Cancel