-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Can't download for some Urls?
This case may occur because of the back-end secure verification.
In the most case, you can fix this problem through adding you known request-header field: BaseDownloadTask#addHeader(name, value)
.
1. referer
which indicate where the request originated:
We can't download the resource from the Url: http://web.dl.byfen.com/app/201631/1470281368903.apk directly, instead you will receive 302 to its homepage, then you download the homepage html, but if you add the request header like the following, You will receive correct resource response.
task.addHeader("Referer", "http://web.dl.byfen.com/app/201631/1470281368903.apk");
which request HTTP header advertises which content encoding, usually a compression algorithm, the client is able to understand
For example, in this issue, we cannot get a right response until you add the request header like the following:
task.addHeader("Accept-Encoding", "gzip, deflate, br");
- Initialization
- Start downloading
- Pause or Stop
- Get the internal stored data
- Customizable Component
- Interface