Im trying to make a search request, but I'm getting the 401 error.
var request = (HttpWebRequest)WebRequest.Create(string.Format("http://api.themoviedb.org/3/search/person?api_key={0}?query={1}", "myapikey", "Batman the dark night"));
request.Method = "GET";
request.Accept = "application/json";
request.Headers.Add("Accept-Charset", "UTF-8");
request.ContentLength = 0;
string responseContent;
using (var response = request.GetResponse() as HttpWebResponse)
{
using (var reader = new StreamReader(response.GetResponseStream()))
{
responseContent = reader.ReadToEnd();
//Console.WriteLine(responseContent);
}
}
What is wrong..
I can easly make a move request without any problems.
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por Travis Bell
el 24 de noviembre de 2013 a las 11:34
Hi Gudui,
Looks like you're not specifying your HTTP params properly. You need with your second and third
?
to&
like so:Cheers.
Contestado por Gudui
el 24 de noviembre de 2013 a las 11:35
Ahh thank you.
Cheers.