Retina versus non retina images

I understand the concept for images loaded from the folder.
If 2 files are saved ex. test.png and test@2x.png, the resolution will be retina with every pixel scaled to one half.
Assuming of course a retina capable iPad.

So far so good, but what if the file or files comes from a http.request ?
How do we then get the retina resolution ?

Re Peter

You need to identify and separate the two non retina and retina images using a symbol or such and do it that way by downloading two images of different sizes, you could save one as @2x but that might not work with codea, so make a custom identifier.