req package:servant-foreign

Full description of an endpoint in your API, generated by listFromAPI. It should give you all the information needed to generate foreign language bindings. Every field containing ftype will use the foreign type mapping specified via HasForeignType (see its docstring on how to set that up). See https://docs.servant.dev/en/stable/tutorial/ApiType.html for accessible documentation of the possible content of an endpoint.
See documentation of _reqBodyContentType
Foreign type of the expected request body (ReqBody), if any
The content type the request body is transferred as. This is a severe limitation of servant-foreign currently, as we only allow the content type to be JSON no user-defined content types. (ReqBodyMultipart is not actually implemented.) Thus, any routes looking like this will work:
"foo" :> Get '[JSON] Foo
while routes like
"foo" :> Get '[MyFancyContentType] Foo
will fail with an error like
• JSON expected in list '[MyFancyContentType]
The URL segments rendered in a way that they can be easily concatenated into a canonical function name
Headers required by this endpoint, with their type
"GET"/"POST"/"PUT"/…
The foreign type of the response, if any
Full list of URL segments, including captures