Requesting JSON data from an API
When working with complex data structures, JSON is a popular format used by many web APIs. However, APIs can respond in other formats, too. Therefore, it's crucial you know how to request a specific format from an API. You can achieve this by adding a header to your requests.
Which of the following requests will return data formatted as JSON?
This exercise is part of the course
Introduction to APIs in Python
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
