clean up how example API request is done