Skip to content

Instantly share code, notes, and snippets.

@MNie
Created August 30, 2016 18:00
Show Gist options
  • Save MNie/318a3f0911ea6e6f0eee925906fac4ea to your computer and use it in GitHub Desktop.
Save MNie/318a3f0911ea6e6f0eee925906fac4ea to your computer and use it in GitHub Desktop.
let loadFile path =
File.ReadAllText path
let getSpellCheck text mode =
let response = Http.RequestString(sprintf "https://api.cognitive.microsoft.com/bing/v5.0/spellcheck/?mode=%s" mode,
body = TextRequest (sprintf "Text=%s" text),
headers = [ContentType "application/x-www-form-urlencoded"; "Ocp-Apim-Subscription-Key", "{api-key}"])
JsonConvert.DeserializeObject<responseJson>(response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment