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)

Reply via email to