# How to get StatusCode without fetching Body/Content in the background

I only need to know whether a specific call returns 200 but:

URLFetch[
"http://exampledata.wolfram.com/10mb.dat"
, "StatusCode"
] // AbsoluteTiming

{15.141, 200}


So it clearly downloads whole 10MB. Similar curl command returns almost instantaneously:

 curl -I http://exampledata.wolfram.com/10mb.dat


so it is clearly possible. How to do this so it will work on every V10+ installation?

URLFetch["http://exampledata.wolfram.com/10mb.dat", "StatusCode",

• +1 for good dig.Though the color is red,it's seem also serve for URLRead.And I'm in 11.1. – yode Apr 20 '17 at 8:46