I am trying to access the API using the following code:
HttpResponse<Root> jsonResponse = Unirest.get("http://api.themoviedb.org/3/discover/movie")
.header("api_key", API)
.header("adult", "false")
.header("vote_count.gte", "5")
.header("release_date.lte", endDate)
.header("release_date.gte", startDate)
.header("page", page.ToString())
.asJson<Root>();
return jsonResponse.Body;
and I get a 401 response but I don't understand why. I am sure that my api_key is correct.
Bir filmi veya diziyi bulamıyor musun? Eklemek için oturum aç.
Bu öğeyi derecelendirmek veya bir listeye eklemek ister misiniz?
Üye değil misin?
Travis Bell adlı kullanıcıyı yanıtla
22 c 2014 tarihinde saat 12:04 ÖS'da
Hi leo.sutton,
I'm guessing it's because you're passing the values in as a header as opposed to a HTTP parameter.
Cheers.