How do i check if a file exists (on the web)?

Hi

I want my game to be able to check if a certain file on a certain webpage exist. and the it can give the user the option on whether they want to download it or not.

My problem is i do not know how to make my game check for that file?

Can anyone help me out

Use UnityWebRequest.Head and check responseCode, if >= 400 then file does not exits (according to wikipedia)

If you are using UnityEngine.WWW to make the web request then you can check the error member from UnityEngine.WWW

its also possible to get the verbose text of the response and parse it for the http status code.