Expand description
Format-based content negotiation (Rails respond_to).
Context::negotiated_format picks a
Format from the request (a .json/.html path extension wins, else the
Accept header), and Context::respond_to
returns a RespondTo builder that runs the branch matching that format.
Structs§
- Respond
To - Builder that evaluates only the branch matching the negotiated format.
Enums§
- Format
- A negotiated response format.
Anymatches the first branch offered.