Note that there are some explanatory texts on larger screens.

plurals
  1. POAccess Control Allow Origin not allowed by
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/9310112/why-am-i-seeing-an-origin-is-not-allowed-by-access-control-allow-origin-error">Why am I seeing an “origin is not allowed by Access-Control-Allow-Origin” error here?</a> </p> </blockquote> <p>I am facing problem with my code can anyone tell me whats wrong with this <strong>Origin <a href="http://localhost:8080" rel="nofollow noreferrer">http://localhost:8080</a> is not allowed by Access-Control-Allow-Origin</strong></p> <pre><code>var http = new getXMLHttpRequestObject(); var url = "http://gdata.youtube.com/action/GetUploadToken"; var sendXML = '&lt;?xml version="1.0"?&gt;&lt;entry xmlns="http://www.w3.org/2005/Atom"'+ 'xmlns:media="http://search.yahoo.com/mrss/'+ 'xmlns:yt="http://gdata.youtube.com/schemas/2007"&gt;'+ '&lt;media:group&gt;&lt;media:title type="plain"&gt;My First API&lt;/media:title&gt;'+ '&lt;media:description type="plain"&gt;First API&lt;/media:description&gt;'+ '&lt;media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat"&gt;People&lt;/media:category&gt;'+ '&lt;media:keywords&gt;first, api&lt;/media:keywords&gt;&lt;/media:group&gt;&lt;/entry&gt;'; http.open("POST", url, true); http.setRequestHeader("Authorization", "AuthSub token=" + AccessToken); http.setRequestHeader("X-GData-Key", "key="+ dev_key); http.setRequestHeader("Content-Type", "application/atom+xml; charset=UTF-8"); http.onreadystatechange = function() { if(http.readyState == 4) { alert(http.responseXML); } } http.send(sendXML); </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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