when i try to download an image from my server, if that image don’t exist, it still passes
the networkListener listner (event.isError is not trigged). i used corona example:
local function networkListener( event ) if ( event.isError ) then print( "Network error!" ) elseif ( event.phase == "began" ) then if ( event.bytesEstimated \<= 0 ) then print( "Download starting, size unknown" ) else print( "Download starting, estimated size: " .. event.bytesEstimated ) end elseif ( event.phase == "progress" ) then if ( event.bytesEstimated \<= 0 ) then print( "Download progress: " .. event.bytesTransferred ) else print( "Download progress: " .. event.bytesTransferred .. " of estimated: " .. event.bytesEstimated ) end elseif ( event.phase == "ended" ) then print( "Download complete, total bytes transferred: " .. event.bytesTransferred ) end end local params = {} -- Tell network.request() that we want the "began" and "progress" events: params.progress = "download" -- Tell network.request() that we want the output to go to a file: params.response = { filename = "corona.jpg", baseDirectory = system.DocumentsDirectory } network.request( "http://docs.coronalabs.com/images/simulator/image-mask-base2.png", "GET", networkListener, params )
is this behavior normal?
