I feel like I’m missing something obvious here. I want to know what format the client requested, and surely ought to be able to get that info without parsing the accept header(s) myself. To be clear conn[:private][:phoenix_format]
has exactly what I want, but I don’t like digging into something called “private”.
For more background, that will contain either “json” or “protobuf”. I have done the config :mime...
& recompile deps stuff necessary to recognize all 3 options for protobuf. So plug accepts: ["json", "protobuf"]
is working correctly, and I just want the controller code to be clean(ish).