Created
December 8, 2017 22:13
-
-
Save dustinlacewell-wk/4949f7925686eae9bcd1df4195d6bdbd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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