#43 ✓resolved
Travis Bell

Via Tender: API v3 configuration content type

Reported by Travis Bell | December 20th, 2011 @ 09:38 AM | in Jaws (closed)

Assigned to Tender discussion #102. As reported in Tender:


I am just starting out with the v3 API.

I know you are now returning only JSON, but what are you intending to do with the response Content-Type header?

I expected to see "application/json" but I seem to be getting "text/html".

Here's my test:

curl -H "Accept: application/json" http://api.themoviedb.org/3/configuration?api_key=whatever

Here's the response:

HTTP/1.1 200 OK
Age: 1662
Cache-Control: public, max-age=36000
Content-Type: text/html;charset=utf-8
Date: Sat, 17 Dec 2011 16:23:19 GMT
Server: nginx
Status: 200 OK
Via: 1.1 varnish
X-Cache: HIT
X-Frame-Options: sameorigin
X-Varnish: 1976679366 1976507048
X-Varnish-Sid: tm-v-p-1200
X-XSS-Protection: 1; mode=block
Content-Length: 218
Connection: keep-alive


The reason why this is important to me is that the REST framework I'm using can automatically convert a JSON response to fully populated (Java as it happens) objects so long as the response Content-Type header is correct. At the moment it doesn't work because it rejects the "HTML" response. Sure, I could take the plain text body and unmarshall it myself, but it seems like I shouldn't need to do that.

Or am I doing something wrong?


Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket