Film Veritabanı Desteği

Hi, I'm trying to get json data. I use BlackBerry 10 platform (qml, cascade). I try this:

    function sendRequest() {
        var xhr = new XMLHttpRequest()
        xhr.onreadystatechange = function() {
            if (xhr.readyState === XMLHttpRequest.DONE) {
                if (xhr.status === 200) {
                    console.log(xhr.responseText)
                }
            }
        }
        xhr.open("GET", "https://api.themoviedb.org/3/search/movie?api_key=<YOUR-API-KEY>&language=cs-CZ&query=Hulk&page=1&include_adult=false")
        xhr.send()
    }

Why does it not work? Everything worked for me last week!

The code is correct. When I try another API, everything works.

for example this one:

xhr.open("GET", "http://www.allten.cz/wp-json/wp/v2/posts/1019", true)

or this one:

xhr.open("GET", "https://www.cnb.cz/cs/financni_trhy/devizovy_trh/kurzy_devizoveho_trhu/denni_kurz.txt", true)

Thank you very much for the answer.

9 yanıt (toplam 1 sayfanın 1.sayfasında)

Jump to last post

We were having a few availability issues around this time, is everything working now?

Unfortunately not.

You'll need to provide some more verbose logs as to what is actually failing. You can see here, that query is working fine:

$ curl -v "https://api.themoviedb.org/3/search/movie?api_key=###&language=cs-CZ&query=Hulk&page=1&include_adult=false"
*   Trying 18.213.189.212...
* TCP_NODELAY set
* Connected to api.themoviedb.org (18.213.189.212) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=*.themoviedb.org
*  start date: Dec  3 00:00:00 2018 GMT
*  expire date: Dec  2 12:00:00 2020 GMT
*  subjectAltName: host "api.themoviedb.org" matched cert's "*.themoviedb.org"
*  issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=RapidSSL RSA CA 2018
*  SSL certificate verify ok.
> GET /3/search/movie?api_key=###&language=cs-CZ&query=Hulk&page=1&include_adult=false HTTP/1.1
> Host: api.themoviedb.org
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Sat, 24 Aug 2019 15:31:53 GMT
< Content-Type: application/json;charset=utf-8
< Content-Length: 9219
< Connection: keep-alive
< Server: openresty
< Vary: Accept-Encoding
< Vary: Accept-Encoding
< Access-Control-Expose-Headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After
< Access-Control-Allow-Origin: *
< ETag: 71ddb91e8fa0541e426a54e538075a5a
< Cache-Control: public, max-age=21600
<
* Connection #0 to host api.themoviedb.org left intact

--------------------
time_namelookup:    0.004153
time_connect:       0.091183
time_appconnect:    0.270376
time_pretransfer:   0.270434
time_redirect:      0.000000
time_starttransfer: 0.381503
--------------------
time_total:  0.384330

I don't know what fails. I used the same code last week and everything was fine.

I also have the code okay - if I use a different url address, everything works fine.

When I try url address in PC, everything works fine but no content is loaded in mobile application.

You could try switching to http, instead of https to see if it makes a difference. I'm just guessing in the dark here though. You'll need to try an enable some verbose HTTP logging and I'm sure you'll see an error somewhere.

Super ... You are amazing relaxed

I tried http instead of https and everything already works.

But why did https work last week?

Is there a problem if I use http instead of https?

Thank you very much again for your help.

It could be a TLS issue. We are enforcing TLS 1.1 as a minimum, and depending how old your platform is, it might be trying to use TLS 1.0. You'll need to read the docs about your HTTP library and see if TLS > 1.1 is supported and how you can make sure to use it if it is.

OK grinning Thank you very much for your help. I appreciate it.

Bir filmi veya diziyi bulamıyor musun? Eklemek için oturum aç.

Küresel

s arama çubuğuna odaklan
p profil menüsünü aç
esc açık bir pencereyi kapat
? klavye kısayol penceresini aç

Medya sayfalarında

b geri git (veya uygulanabilirse ana ekrana)
e sayfayı düzenlemeye git

TV sezonu sayfalarında

(sağa ok) sonraki sezona git
(sol ok) önceki sezona git

TV bölüm sayfalarında

(sağa ok) sonraki bölüme git
(sol ok) önceki bölüme git

Tüm görüntü sayfalarında

a resim ekle penceresini aç

Tüm düzenleme sayfalarında

t çeviri seçiciyi aç
ctrl+ s formu gönder

Tartışma sayfalarında

n yeni tartışma oluştur
w izleme durumunu değiştir
p umumi/hususi değiştir
c kapalı/açık değiştir
a etkinliği aç
r tartışmayı yanıtla
l son yanıta git
ctrl+ enter mesajını gönder
(sağa ok) sonraki sayfa
(sol ok) önceki sayfa

Ayarlar

Bu öğeyi derecelendirmek veya bir listeye eklemek ister misiniz?

Giriş