Hi,
Might be that I’m missing something here, but I seem to be hitting walls on implementing a basic “check if web resource has updated and download if needed”-function. Basically I want to use basic http features and submit “If-Modified-Since”-header and then check if I got 200 or 304 as response.
Now network.download kind of makes this in one call. Except that it seems to clobber the file in case of 304 with an empty one. I’d really like the file to update only if 200 is returned.
Next network.request is fine in returning the status code. But the event listener only gets the response data without knowing the file name / request. So I’d need to make sure I only have one request open, which kind of defeats the purpose.
Last LuaSocket allows you to go all the way and do everything you want, except it’s synchronous by default
I know you there are ways to go around this, but in general I’d like to keep it simpler.
Ideas, comments, thoughts?
Matias [import]uid: 46570 topic_id: 24516 reply_id: 324516[/import]