Skip to content

Instantly share code, notes, and snippets.

View DavidBrower's full-sized avatar

David Brower DavidBrower

  • Civica MDM
  • Glasgow, Scotland
View GitHub Profile
@patriksvensson
patriksvensson / statuscode.cake
Created August 17, 2016 19:00
Cake script: Gets the status code from a web request and outputs it.
// Cake script
#r "System.Net"
using System.Net;
var request = (HttpWebRequest)WebRequest.Create("http://google.com");
var response = (HttpWebResponse)request.GetResponse();
var statusCode = response.StatusCode;
Information("Received {0}!", statusCode);