package savvy

  1. Overview
  2. Docs
A straightforward OAuth2 client

Install

dune-project
 Dependency

Authors

Maintainers

Sources

savvy-0.4.1.tbz
sha256=d6ef1f13c522e1d920e2ddc707ee7da4392bf178d8ccbaaea50cc5a2b67c10ad
sha512=74ee303d5b80453ce8a6c6fb49e765b91079bf0b4ed84801ad7d9adcc1dd4ebb22075706e9de4ee90800e2bef5f2eb133ea94f6d82c4e216159ea0e298bb88e8

doc/src/savvy.json_uri/json_uri.ml.html

Source file json_uri.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
module T = struct
  type t = Uri.t
  let to_yojson uri = `String (Uri.to_string uri)
  let of_yojson = function
    | `String s -> Ok (Uri.of_string s)
    | _ -> Error "expected string for Uri.t"
end

(* This is a fancy way of wrapping our new methods (above) into the Uri module *)
(* Essentially what's happening here is the Uri module is brought into context *)
(* and then our struct above is added to context on top of it and the total is returned *)
include Uri
include T