I started to work with android.app.DownloadManager and faced a problem.
By default, DM sending HTTP GET request to download file:
GET http://www.example.com/getfile HTTP/1.1
Cookie: id=sdfsdf;Max-Age=10800000;Path=/
Host: ___
Connection: Keep-Alive
User-Agent: AndroidDownloadManager Paros/3.2.13
Content-length: 0
But I need to send some data in request(e.g. json string)
Are there any ways to send HTTP POST request in DownloadManager
While waiting for another more accurate answer :
I don't think you can add data to this request since, as you said it, it's a GET
request and not POST
.
Maybe this thread can give you a hint on another way to achieve what you want if the Download-Manager
is not absolutely required : How do download a file with login using HttpURLConnection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With