chucknorris-io / chuck-api

👊 chucknorris.io is a free resource for hand curated Chuck Norris facts.
https://api.chucknorris.io
GNU General Public License v3.0
239 stars 29 forks source link

How to retrieve a specific joke? #8

Closed dnaeon closed 7 years ago

dnaeon commented 7 years ago

I'd like to be able to retrieve a joke with specific id, is that possible?

The main reason for this is to include this as part of the tests in my tool, so if I'm able to retrieve a specific joke then I can compare the results in my tests.

For example what would be the API endpoint for this joke with id bdo-g3sjtowgdeneipfgrg?

manicmaniac commented 7 years ago

@dnaeon It can be achieved by using the endpoint you referred, if you explicitly request JSON as response.

Try curl --header 'Accept: application/json' https://api.chucknorris.io/jokes/bdo-g3sjtowgdeneipfgrg.

dnaeon commented 7 years ago

Thanks!