example.ml 336 Bytes
Newer Older
zapashcanon's avatar
zapashcanon committed
1 2 3 4 5 6 7 8 9 10 11 12
let instance = "https://osh.ocamlpro.com"

let badge = "/badge?label=build&color=green&status=passing"

let url = Format.sprintf "%s%s" instance badge

let () =
  match Ezcurl.get ~url () with
  | Error (_code, msg) ->
    Format.eprintf "error: %s@." msg;
    exit 1
  | Ok badge -> Format.printf "Here's your badge:@.%s@." badge.body