The Movie Database Support

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 erantzun (1(e)tik 1. orrian)

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.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Ezarpenak

Elementu hau kalifikatu edo zerrenda batera gehitzea nahi al duzu?

Saioa hasi