You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Christian Bürckert (JIRA)" <ji...@apache.org> on 2019/01/14 13:24:00 UTC

[jira] [Created] (THRIFT-4737) thrift.js does not use customHeaders in jqRequest

Christian Bürckert created THRIFT-4737:
------------------------------------------

             Summary: thrift.js does not use customHeaders in jqRequest
                 Key: THRIFT-4737
                 URL: https://issues.apache.org/jira/browse/THRIFT-4737
             Project: Thrift
          Issue Type: Bug
          Components: JavaScript - Library
    Affects Versions: 0.11.0, 0.10.0, 0.12.0
            Reporter: Christian Bürckert


When using ajax requests via jquery custom headers are not added to the request.

 

Adding beforeSend to the jQuery.ajax will solve this Problem.
{code:java}
            beforeSend: function (xreq) {
                Object.keys(thriftTransport.customHeaders).forEach(function (prop) {
                    xreq.setRequestHeader(prop, thriftTransport.customHeaders[prop]);
                });
            }
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)