I've never worked with JSON from a web API before. I'm curious as to how it works. I've been reading up online but I don't really know for sure how it's done.
From what I understand it's:
1) Send a GET request to the server 2) Receive the JSON response 3) Do something with the data
The question I have is how does the server know to send back JSON instead of HTML?