[ 
https://issues.apache.org/jira/browse/THRIFT-2674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14105961#comment-14105961
 ] 

Roger Meier commented on THRIFT-2674:
-------------------------------------

What we have today is this:
{noformat}
Content-Type: application/x-thrift
{noformat}
used by cocoa, cpp, d, delphi, go, java, perl, php,py and rb.

the x- prefix is defined here: http://tools.ietf.org/html/rfc6838#section-3.4

Yes, RFC compliant would be a good option.
{noformat}
Content-Type: application/vnd.apache.thrift;
Content-Type: application/vnd.apache.thrift+json; charset=utf-8
Content-Type: application/vnd.apache.thrift+compact;
{noformat}
I will register these application types during the next weekend.
-roger


> JavaScript: declare Accept: and Content-Type: in request
> --------------------------------------------------------
>
>                 Key: THRIFT-2674
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2674
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>            Reporter: Stig Bakken
>            Priority: Minor
>
> When a JS client communicates with a backend supporting several encodings, 
> knowing which protocol to use is a bit kludgy.  This patch tries to fix that 
> by always setting the Accept: and Content-Type: request headers to 
> "application/json".



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to