Note that there are some explanatory texts on larger screens.

plurals
  1. POJira rest client in javascript giving error
    primarykey
    data
    text
    <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt; &lt;/script&gt; &lt;script&gt; $(document).ready(function(){ $.ajax({ type: "GET", dataType: 'jsonp', url: "http://myJira.com/rest/api/2/issue/MA-6614/comment", username : "myusrName", password : "myPwd", success: function (data) { console.log( "Sample of data:", JSON.stringify(data)); }, error: function (errormessage) { console.log( "errorMessage:", errormessage); } }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>While running the above code I am getting <b>SyntaxError: missing ; before statement</b> error. I read somewhere Access-Control-Allow-Origin should be used to solve problem. But I don't find a good documentation anywhere about how to use with Jira.</p> <p><b>"UPDATE"</b><br> The above error I am getting if I have already loggedin in jira. If I logout in jira and then run the above code then getting error <b>"NetworkError: 401 Unauthorized - <a href="http://myjira.com/rest/api/2/issue/MA-6614/comment?callback=jQuery1102010440085066514837_1388216960965&amp;_=1388216960966" rel="nofollow">http://myjira.com/rest/api/2/issue/MA-6614/comment?callback=jQuery1102010440085066514837_1388216960965&amp;_=1388216960966</a>"</b></p> <p>It seems the above code has two problem. 1. It is not able to authenticate in jira. 2. if we already authenticate in jira (that means browser has cookies)and make the request then syntax error is shown because of jsonp.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload