Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Created December 8, 2017 22:13
Show Gist options
  • Save dustinlacewell-wk/4949f7925686eae9bcd1df4195d6bdbd to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/4949f7925686eae9bcd1df4195d6bdbd to your computer and use it in GitHub Desktop.
open Argu
open Hopac
[<EntryPoint>]
let main argv =
let query = @"_sourceCategory=harbour/container-health"
try
Args("fss", argv)
|> Client.query query
|> Client.send
|> function
| (202, resp) -> printfn "%A" resp
| (400, resp) -> printfn "ERROR: %A" resp
| (415, _) -> printfn "ERROR: Content-Type not application/json"
| _ -> printfn "ERROR: Unknown"
with
| Failure(msg) -> printfn "Error: %s" msg
| :? ArguParseException as ex -> printfn "%s" ex.Message
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment