Implement content negotiation to serve multiple content types.
Configure the JAX-RS application.
Parent
Use content negotiation to serve multiple content types in JAX-RS applications
Use content negotiation to determine the best resource representation for the server to return to the client. We can implement content negotiation based on URL patterns, request parameters, or HTTP headers.
- Implement content negotiation based on URL patterns
- Implement content negotiation based on request parameters
- Implement content negotiation based on HTTP headers
What to do next
Assemble JAX-RS web applications.
Subtopics
- Implement content negotiation based on URL patterns
Representational State Transfer (REST) applications can return different representations of resources. We can use content negotiation based on URL patterns to determine the content format used to exchange data between servers and clients.
- Implement content negotiation based on request parameters
Representational State Transfer (REST) applications can return different representations of resources. We can use content negotiation based on request parameters to determine the content format used to exchange data between servers and clients.
- Implement content negotiation based on HTTP headers
Representational State Transfer (REST) applications can return different representations of resources. We can use content negotiation based on HTTP Accept headers to determine the content format used to exchange data between servers and clients.
Related tasks
Implement content negotiation based on URL patterns Implement content negotiation based on request parameters Implement content negotiation based on HTTP headers