Skip to content

Can't download for some Urls?

Jacksgong edited this page Oct 25, 2016 · 6 revisions

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):

such as 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, but if you add the request header like the following:

task.addHeader("Referer", "http://web.dl.byfen.com/app/201631/1470281368903.apk");

You will receive correct resource response.