fork download
  1. // using (var client = new HttpClient())
  2. // {
  3. // using (var response = client.PostAsync(uri, new StringContent(JsonConvert.SerializeObject(content), Encoding.UTF8, "application/json")))
  4. // {
  5. // response.Result.EnsureSuccessStatusCode();
  6. // }
  7. // }
  8. open System.Net.Http
  9. open System.Text
  10. open Newtonsoft.Json
  11.  
  12.  
  13. module communication =
  14. let post(message:string) = async {
  15. let uri = "https://h...content-available-to-author-only...k.com/"
  16. use client = new HttpClient()
  17. use response = client.PostAsync(uri, new StringContent(JsonConvert.SerializeObject(message), Encoding.UTF8, "application/json"))
  18. //do! response |> Async.RunSynchronously |>
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:8:1: error: 'open' does not name a type
 open System.Net.Http
 ^
stdout
Standard output is empty