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:41:00 UTC
[jira] [Resolved] (THRIFT-4737) thrift.js does not use
customHeaders in jqRequest
[ https://issues.apache.org/jira/browse/THRIFT-4737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Bürckert resolved THRIFT-4737.
----------------------------------------
Resolution: Fixed
Fix Version/s: 0.12.0
Simply added the missing headers to beforeSend in the jqXHR.
> 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.10.0, 0.11.0, 0.12.0
> Reporter: Christian Bürckert
> Priority: Trivial
> Fix For: 0.12.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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)