The Movie Database qoldaýy

I made an app over a year ago for getting movie info and it worked perfectly up until today. It just throws up an error "The remote server returned an error: (406) Not Acceptable."

It's been over a week since I used it and I was using the 2.1 API. I've been looking around the forum and I see that API has been removed and replaced completely with the 3 API so I'm assuming that must have something to do with my problem.

I'm using Visual Basic and searching for the film "mama" .Here's the code I had:

Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(http://api.themoviedb.org/3/search/movie?api_key***&query=mama)
        Dim response As System.Net.HttpWebResponse = request.GetResponse()

I've now replaced it with:

Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://api.themoviedb.org/3/search/movie?api_key=***&query="mama)
        Dim response As System.Net.HttpWebResponse = request.GetResponse()

When I type "http://api.themoviedb.org/3/search/movie?api_key=***&query="mama" directly in to the web browser it loads the page.

Any help would be much appreciated :)

2 jaýap (1 ishinen 1 betinde)

Jump to last post

I sorted it.

Just added "request.Accept = "application/json" to the code.

  Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://api.themoviedb.org/3/search/movie? api_key=****&query=mama")
    request.Accept = "application/json"

Simple really! :)

Yup :) Glad you sorted it out.

Fılmdi nemese kórsetimdi taba almadyńyz ba? Ony jasaý úshin kirińiz.

Ǵalamdyq

s kezelimdi izdeý jolaǵyna aýystyrý
p profaıl mázirin ashý
esc ashyq terezeni jabý
? perneler tirkesimi terezesin ashý

Tasyǵyshtar betterinde

b artqa oralý (nemese qoldanylatyn bolsa, tektikke)
e óńdeý betine ótý

Telemaýsym betterinde

(oń jaq kórsetki) kelesi telemaýsymǵa ótý
(sol jaq kórsetki) aldyńǵy telemaýsymǵa ótý

Epizod betterinde

(oń jaq kórsetki) kelesi epızodqa ótý
(sol jaq kórsetki) aldyńǵy epızodqa ótý

Barlyq keskin betterinde

a keskin ústeý terezesin ashý

Barlyq óńdeý betterinde

t tárjime tańdaǵyshyn ashý
ctrl+ s pishindi jiberý

Talqylaý betterinde

n jańa talqylaýdy jasaý
w qaralǵan kúıin aýystyrý
p jalpy/jekeni aýystyrý
c jabý/ashýdy aýystyrý
a áreketterdi ashý
r talqylaýǵa jaýap berý
l sońǵy jaýapqa ótý
ctrl+ enter habaryńyzdy jiberý
(oń jaq kórsetki) kelesi betke
(sol jaq kórsetki) aldyńǵy betke

Parametrler

Want to rate or add this item to a list?

Kirý