Handle attachment in response with RequestBuilder in GWT
I am making a HTTP POST request from GWT Client to a HTTPServlet. This Servlet is creating a PDF file from request content and writing it to response stream. Headers of the response stream are: Content-Disposition: attachment; filename=report.pdf I want to open this PDF in new window of the user's browser or prompt him to download it. import com.google.gwt.http.client.*; ... String url = "http://www.myserver.com/getData?type=3"; RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, URL.encode(url)); try { Request request = builder.sendRequest(data, new RequestCallback() { public