javascript - The 'Access-Control-Allow-Origin' header contains multiple values 'null, *', but only one is allowed -


यह मेरा कोड है

  & lt; script & gt; फ़ंक्शन loadXMLDoc () {var xmlhttp; अगर (window.XMLHttpRequest) {// code for IE7 +, फ़ायरफ़ॉक्स, क्रोम, ओपेरा, सफारी xmlhttp = नया XMLHttpRequest (); } Else {// code for IE6, IE5 xmlhttp = नया ActiveXObject ("Microsoft.XMLHTTP"); } Xmlhttp.onreadystatechange = function () {var responseText = xmlhttp.status + xmlhttp.responseText; document.getElementById ( "myDiv") innerHTML = responseText। } Xmlhttp.open ("GET", "https://smp-i303288trial.hanatrial.ondemand.com/public/onDemandDemo/Products?$top=2"); Xmlhttp.setRequestHeader ("X-SUP-APPCID", "f02e061a-f6ff-405a-8e45-573870e6435b"); xmlhttp.send (); } & Lt; / script & gt;  

जब मैंने GET अनुरोध करने की कोशिश की तो मुझे मिल रहा है

"XMLHttpRequest लोड नहीं किया जा सकता है? $ Top = 2। 'एक्सेस-कन्ट्रोल-अनुमति दें -ऑग्रीन 'हैडर में एकाधिक मान' नल, * 'होते हैं, लेकिन केवल एक ही अनुमति दी जाती है। उत्पत्ति' रिक्त 'को ऐक्सेस की अनुमति नहीं है। "

** त्रुटि

लेकिन जब मुझे एक ही यूआरएल और हेडर में requestmaker.com का इस्तेमाल किया गया तो मुझे जवाब मिल रहा है

कृपया जावास्क्रिप्ट और एजेएक्स के लिए बहुत नया होने के नाते कृपया मदद करें।


Comments

Popular posts from this blog

javascript - Render HTML after each iteration in loop -

java - Joda Time Interval Not returning what I expect -

python - Pandas concat gives error ValueError: Plan shapes are not aligned -