crockford base32: remove padding
This commit is contained in:
parent
d9b71e24cd
commit
6af4f57d20
167 changed files with 17484 additions and 5 deletions
|
|
@ -1,22 +0,0 @@
|
|||
let respond_with_plain_text_error ?status e req =
|
||||
let open Vif.Response in
|
||||
let open Syntax in
|
||||
let status = Option.value ~default:`Bad_request status in
|
||||
let* () = add ~field:"content-type" "text/plain; charset=utf-8" in
|
||||
let* () = with_string req e in
|
||||
respond status
|
||||
|
||||
let respond_with_ok_json content req =
|
||||
let open Vif.Response in
|
||||
let open Syntax in
|
||||
let* () = add ~field:"content-type" "application/json" in
|
||||
let* () = with_string req content in
|
||||
respond `OK
|
||||
|
||||
let respond_with_res res req =
|
||||
match res with
|
||||
| Error err ->
|
||||
Logs.err (fun m -> m "%s." err);
|
||||
let err = Fmt.str "%s@." err in
|
||||
respond_with_plain_text_error err req
|
||||
| Ok content -> respond_with_ok_json content req
|
||||
Loading…
Add table
Add a link
Reference in a new issue