added example of handling GET requests that return JSON