How to download image from network on JSB?

Hi,
I didn’t find how to download image from network on JSB sample.
Is use XMLHttpRequest the correct way?

Thanks.

I have reported the problem of XMLHttpRequest,now it looks like
1.only support text/plain
2.no progress indicator
3.only status ‘done’ is triggered, no standard xmlrequesthttp 4 status (0,1,2,3,4)
4.if download large size (>50k? no exact ), only can get one part of the html code

I think assetmanager maybe a way

Some code sample?