Java - Quickest way to check if URL exists

后端 未结 3 568
一个人的身影
一个人的身影 2021-01-03 21:49

Hi I am writing a program that goes through many different URLs and just checks if they exist or not. I am basically checking if the error code returned is 404 or not. Howev

3条回答
  •  一个人的身影
    2021-01-03 22:16

    Seems you can set the timeout property, make sure it is acceptable. And if you have many urls to test, do them parallelly, it will be much faster. Hope this will be helpful.

提交回复
热议问题