添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
安静的海豚  ·  Excel 365 - Header, ...·  1 月前    · 
谦虚好学的黑框眼镜  ·  Send HTTP Request·  1 月前    · 
唠叨的碗  ·  【 云原生 kubernetes 】- ...·  1 月前    · 
眼睛小的野马  ·  Common application ...·  1 月前    · 
安静的熊猫  ·  前言 · HanKin's Gitbook·  7 月前    · 
性感的香槟  ·  FTX Supaforza GT 1/7 ...·  7 月前    · 
爱看书的鼠标垫  ·  Invoking Lambda ...·  1 年前    · 
Create
cancel
Showing results for
Search instead for
Sign up Log in

Hi all,

I'm receiving this error trying to use via jquery the cookie with the previously opened session:

jQuery.ajax({
type: "GET",
url: " http://xxxx.xxxx.xxxx.xxxx/rest/api/2/issue/myissue ",
contentType: "application/json",
beforeSend: function (request) {
request.setRequestHeader("cookie", document.cookie);
},
error: function (request, status, error) {
console.log('Error');
},
success: function (data) {
console.log('Success');
}
});

Does anyone know which is the proper way to use this cookie for ajax calls?

After this error I also receive "The 'Access-Control-Allow-Origin' header contains multiple values".

Thanks in advance.

Hello MP.

A little bit late, however, I think that you are being affected by JRASERVER-59101 . The work around is to s etup a proxy and rewrite Access-Control-Request-Method header. Please see the bug report for more details. I believe that this post in our Community could also be of interest to you:  https://community.atlassian.com/t5/Answers-Developer-Questions/Cross-Origin-Resource-Sharing-with-JIRA-REST-API-and-Javascript/qaq-p/484801 .

Hope this helps!

Cheers,
Jennifer van Leeuwen | Atlassian Support

AUG Leaders

Atlassian Community Events