servant-reason-0.1.0.0: test/reason-sources/getOneWithDynamicUrlSource.re
open BookType;
let getOne = (urlBase) => {
Js.Promise.(
Fetch.fetchWithInit(String.concat("/"
,[ urlBase
, "one"
])
,Fetch.RequestInit.make(~method_=Get
,()))
|> then_(Fetch.Response.json)
|> then_(response => (response |> Json.Decode.int |> ((x) => Belt_Result.Ok(x)) |> resolve)))
}