Try 30 days of free premium.

NULL results with Curl

test2000 wrote 2 years ago: 1

Hello

With the following API call I get the desired results in the browser and also with Postman.

https://api.tvmaze.com/lookup/shows?imdb=tt0411008

However, I get a NULL response when I use Curl. I use macOS Big Sur with all the latest updates, and I don't have problems with other APIs to get the correct results with Curl.

Do I need to use some special parameters for Curl to get the correct results? Unfortunately I haven't found any docs so far.

If using --verbose with the Curl command, I can also see the following: Connection state changed (MAX_CONCURRENT_STREAMS == 128)!

Does that have any connection with my problem

Any hints would be appreciated

Thans

AJ


david wrote 2 years ago: 2

The lookup endpoint returns a HTTP 302 redirect. Try "curl -L http://..." (or setting CURLOPT_FOLLOWLOCATION to true)

test2000 wrote 2 years ago: 1

Great... I get the correct results with the -L parameter... thanks a lot for the help.

Try 30 days of free premium.