Friday, 21 April 2017

Api - Page can't be found

I'm requesting some data from an API - in particular https://api.tvmaze.com/singlesearch/shows?q=Friends&embed=episodes usually, when I get an invalid request with APIs I get it in JSON format. So I can easily send that data back (to discord). But with this API if you replace friends with a random string it returns a page saying This api.tvmaze.com page can't be found. How can I send this data back to the user?

I'm using NodeJS and the node-fetch module to get the request.



via Rusty

No comments:

Post a Comment