Fork me on GitHub
#pedestal
<
2021-11-12
>
simongray10:11:56

@frwdrik Thanks! I wasn’t expecting it to be to be this simple. So I gather that the content-type negotiation logic is the same as for language negotiation?

Fredrik10:11:12

According to that link you mentioned, the "Accept-Languge" header uses https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation

Fredrik10:11:59

Listed on that page is several "Accept-*" headers that the server can negotiate on. But I believe it ultimately is up to the server to choose exactly which negotiation strategy it wants to use. For Apache, check out https://httpd.apache.org/docs/current/en/content-negotiation.html#algorithm

Fredrik10:11:18

But in short, yes, using the same negotiation logic should be fine 🙂

Fredrik10:11:23

The io.pedestal.http.content-negotiation also mentions it has public functions "to allow others to build custom accept-* handling (language, charset, etc.)"