Skip to content

Instantly share code, notes, and snippets.

@nicopaez
Created November 20, 2013 11:19
Show Gist options
  • Save nicopaez/7561585 to your computer and use it in GitHub Desktop.
Save nicopaez/7561585 to your computer and use it in GitHub Desktop.
$req = [System.Net.HttpWebRequest]::Create("http://someplace");
$response = $null
$response = $req.GetResponse()
if ($response.StatusCode -eq "OK")
{
Write "Ok"
}
else
{
throw "Error"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment