From ccbcb9f6f62b0cfbd444ad4e28b831d053c84931 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Mon, 11 Sep 2023 23:58:31 -0400 Subject: [PATCH] doc --- src/twirp_tiny_httpd/twirp_tiny_httpd.mli | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/twirp_tiny_httpd/twirp_tiny_httpd.mli b/src/twirp_tiny_httpd/twirp_tiny_httpd.mli index d82ba08b..0123f666 100644 --- a/src/twirp_tiny_httpd/twirp_tiny_httpd.mli +++ b/src/twirp_tiny_httpd/twirp_tiny_httpd.mli @@ -14,5 +14,14 @@ val add_service : (** [add_service http_server service] adds all handlers of [service] to the given httpd. - Services that use streaming will return "501 unimplemented", because - twirp over http 1.1 does not support streaming. *) + As a reminder, a RPC "foo" under service "bar" is routed under [prefix/bar/foo] + using the POST method. + The body is either binary, alongside the header "application/protobuf", + or JSON, alongside the header "application/json". + Errors are always encoded as a JSON object and are indicated by a + failing HTTP code (outside of [200…299] range). + + RPCs that use streaming (on either the client or server side) + will always return "501 unimplemented", because + twirp over http 1.1 does not support streaming. +*)