Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Oct 20, 2023
1 parent a50f21d commit ccbcb9f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/twirp_tiny_httpd/twirp_tiny_httpd.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*)

0 comments on commit ccbcb9f

Please sign in to comment.