criticalmaps / criticalmaps-android

🤖 Critical Maps Android App
http://criticalmaps.net
Apache License 2.0
136 stars 27 forks source link

Return correct content type #53

Closed johnjohndoe closed 8 years ago

johnjohndoe commented 8 years ago

The JSON response from the API does not return the correct content type:

$ curl -s -D - http://api.criticalmaps.net/twitter/get.php

HTTP/1.1 200 OK
Date: Sun, 04 Oct 2015 22:27:23 GMT
Server: Apache
X-Powered-By: PHP/5.4.44
Transfer-Encoding: chunked
Content-Type: text/html

It should be Content-Type: application/json;charset=utf-8 instead.

johnjohndoe commented 8 years ago

I opened a new issue for the correct repository.

johnjohndoe commented 8 years ago

Since the API is not yet published I reopen this issue to being fixed asap.

johnjohndoe commented 8 years ago

You will be happy to see pretty formatted output in your browser as soon as the response type is correct and you use an add-on such as JSONView for Chrome or Firefox.

johnjohndoe commented 8 years ago

Any news here since https://github.com/criticalmaps/criticalmaps-api is out?

stephanlindauer commented 8 years ago

i haven't really started to port that logic to the new system. i am kinda stuck right now finding the right setup to properly scale the servers up and down.

stephanlindauer commented 8 years ago

ok fixed for /postv2 just a temporary solution though

stephanlindauer commented 8 years ago

i will close this issue after this will automatically work with the puma + sinatra setup if you need more endpoints to have this header for now just reopen the issue

johnjohndoe commented 8 years ago

I suppose you want to say that you are switching http://api.criticalmaps.net/twitter/get.php from HTTP GET to HTTP POST? I could however not confirm application/json;charset=utf-8 is returned as a content type. Can you please link to the specific code snippet of the API? I could maybe help to configure the content type for the endpoint.