I have to specify a specific referrer to successfully load certain images on the remote host. (For example, the referrer should be "", otherwise the webserver will return HTTP 403)
The agency has a section on specifying HTTP headers for AJAX calls, but I do not have a piece Think how to do this for a simple async image call. For example, here is a normal AUTO code that is used to display an image on the network:
New AQuery (submodelphoto) .image (MyApplication.MEDIA_BASE_URL + getItem (status), True, truth, 0, r.drawable.default_image); How do I specify an HTTP Referrer for this call? Is it possible to set up to do this for each call during my app? (To do this I have not repeatedly tried to load an image)
after some Excavation (read more) I have come up with this solution:
BitmapAjackCollBack CB = new bitmapAccalbackBack (); Cb.header ("Referrer", "http://www.example.com"); Cb.url (MyApplication.MEDIA_BASE_URL + getItem (status)). Fallback (R.drawable. Default_image) .memCache (true). File cache (true); New AQuery (submodelphoto) .image (cb); It seems to work, just to think that for every request there can be a way to set up the referrer for AQuery.
No comments:
Post a Comment