I want to send POST request (like html form) and get file (HTTP header: "Content-Disposition: attachment; filename="myfile.pdf"). Can you help me?
How to send POST request and get file response?
18.4k Views Asked by latata At
2
There are 2 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in POST
- Jquery on submit ajax post needs two clicks in IE
- cleaning a post URL from an Array
- AJAX xmlhttp.open sumit data using POST method
- Check if POST is succesfull (Android)
- shell cript in php code
- Recover the data already recorded in my Django admin space in my form
- post request (with body) in node.js
- issues using htmlspecialchars($_POST['']) to keep data on value after submitting
- How do you Request[""] with a Dynamic Variable? Request["@Variable"]?
- PHP Curl json POST not working for me
- difference between youtube's request and mine
- Upload Image / Make Post Request via curl + scrot + xclip
- POST the values of several html <input type='button'>
- Actionscript 3 Air iOS POST data not sending with URLLoader
- Laravel throwing error on foreach() loop on POST
Related Questions in ATTACHMENT
- how to display page's attachment image in wordpress custom widget
- Email a db file Android
- How to extract attachment using Mime4j 0.7.2
- BinaryWriter.Write is not creating the .pdf file
- php - instead of uploading to folder, send as email with attachment of file uploaded
- Xpages display attachment in dialog box from another document
- Item not being properly indexed in PHP array inside of for loop
- Sending Image Attachment in Quickblox
- Possible to transmit files using Crossbar.io and WAMP?
- Attachments mess with HTML Email Template
- Android sending email with attachements
- Plain text emails displayed as attachment on some email clients
- iText - transform html to pdf and add and link to attachment
- PHP - mail with attachments - message not showing
- phpmailer not sending attachments
Related Questions in HTTP-POST
- Ajax.beginForm() cannot get post value
- Python: post files using httplib2
- Spring @RequestPart multipart/mixed Object errors
- Failed to add a node to spatial layer with https post request in Neo4j php
- angularjs post error -405 (Method Not Allowed)
- Ionic app data from html to php server
- How to clear cache only for specific services in android programatically
- error while sendin http PUt to creat a new page in xwiki with REST api
- Sending http post request to php with many data using angular
- Watson Content Analytics: How to make web crawler plug-in to get data, sending POST request?
- Android: how to HTTP post this?
- Http Post with duplicate name values MVC
- how to post objects from angular to a webapi controller
- Where does user registration data get stored with node.js
- MVC - Ajax.BeginForm() generating empty action
Related Questions in CONTENT-DISPOSITION
- Mobiles: downloading docx files, sometimes there is an error showing up that the file is corrupted
- OmniFaces CacheControlFilter has no effect when response contains Content-Disposition header
- Webclient produce boundary ----WebKitFormBoundary8huFCK1rAfUxxul6
- eMail - alternative to text/plain and text/html
- How to generate PDF in new window using itext in Struts2
- How can I programmatically make a link create an unfocused tab in Chrome 41?
- why is a forward slash converted to a hyphen / dash
- Content-Disposition Considered Harmful?
- How do I open the attachment txt file from server response using perl?
- Could not find file - "Content-Disposition" in C#
- How to set content disposition on individual azure blob requests?
- Internet Explorer ignores Content-Disposition over HTTPS
- How to send POST request and get file response?
- Viewing MHTML (.mht) file in web page
- How do I upload both form data and multiple files from my android app, using HTTPURLConnection to my server, where I am using PHP?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Your best option is probably to use a third party library such as HttpClient or HTMLUnit.
If you prefer to do it with the standard API it's not that complicated.