Skip to content

Instantly share code, notes, and snippets.

@TheDahv
Created October 22, 2010 23:56
Show Gist options
  • Save TheDahv/641568 to your computer and use it in GitHub Desktop.
Save TheDahv/641568 to your computer and use it in GitHub Desktop.
Combined with an auth token, this function returns the contents of a web request to a given URL
GetWebRequestHelper (url:string) =
let req = HttpWebRequest.Create(url)
req.Headers.Add("Authorization: GoogleLogin auth=" + auth)
let response = req.GetResponse()
let responseStream = response.GetResponseStream()
let sr = new StreamReader(responseStream)
sr.ReadToEnd()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment