Register to Better Coder! It's free.
Enjoy the premium features and succeed at every job interview.

BP140: Use HTTP headers for content negotiation

Many APIs allow a caller to define what format the content should be returned in. Often this is either JSON or XML.

We recommend to use HTTP headers for defining the format of the content.

When HTTP headers are used the URL is more readable and doesn't contain unnecessary format definition.

Comments

No Comments Yet.
Be the first to tell us what you think.

Download Better Coder application to your phone and get unlimited access to the collection of enterprise best practices.

Get it on Google Play