How does content negotiation work in REST APIs?

Technical