cjdelisle / wotbot

INCOMPLETE: This is here only for historical purposes and to provide inspiration, it might be completed at some point in the future but there is no plan
5 stars 2 forks source link

add appropriate headers for a json api #4

Closed ansuz closed 8 years ago

ansuz commented 8 years ago

set content type as json allow cross-origin-resource-sharing

now you can fetch the data more easily from clientside js.

Kubuxu commented 8 years ago

There should be probably utf8 encoding in content type. Even though JSON is defined as utf8 some browser will use defaults.

ansuz commented 8 years ago

related: https://github.com/request/request/issues/383

ansuz commented 8 years ago

They closed that with a wontfix :confused: