Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
jogga
Posts: 2
Joined: Tue Mar 05, 2019 2:00 pm

REST API not working from macOS app?

Tue Mar 05, 2019 2:09 pm

Hi,

Since some days my macOS app doesn't work with the REST API. Nothing changed in the app.

I'm just searching for subtitles like before and I get the web page xml back instead of the JSON answer???

https://rest.opensubtitles.org/search/q ... ageid-swe/ sending in my "Playr" app as "User-Agent" header field.

What has changed?

If I runt this command from the Terminal it works??? What's going on?

curl -A 'Playr' https://rest.opensubtitles.org/search/m ... c54e9cf314

My app is unusable in this state :-(

Best regards / Jörgen

jogga
Posts: 2
Joined: Tue Mar 05, 2019 2:00 pm

Re: REST API not working from macOS app?

Tue Mar 05, 2019 7:32 pm

It turns out that if the url ends with a "/" it doesn't work any longer. Something must have changed since this used to work before.

User avatar
oss
Site Admin
Posts: 4641
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: REST API not working from macOS app?

Fri Mar 08, 2019 7:02 am

Hi

Hi

curl -A 'Playr' https://rest.opensubtitles.org/search/m ... c54e9cf314

works

curl -A 'Playr' https://rest.opensubtitles.org/search/m ... 54e9cf314/

doesnt work

curl -L -A 'Playr' https://rest.opensubtitles.org/search/m ... 54e9cf314/

works

Follow redirect is fixed, should be all good now, better to request without "/" on end, one redirect less (none of opensubtitles.org url have "/" on end)

Return to “Developing”

Who is online

Users browsing this forum: No registered users and 3 guests