What is the best approach for requesting JSON instead of XML from an API?

  • Add .json to the URL.
  •  APIs do not use XML.
  •  Use the Content-Type header.
  •  Use the Accept header.

Leave a Reply

Your email address will not be published. Required fields are marked *