title: Need a way to enable CORS in vueJS
body: <p>I am new to vueJS and version using is 2.0. I need to fetch some JSON data from url. Using javacsript fetch methods to get the data from URL. below is my code,</p>
  
  <pre><code>function getValue() {
              const requestOptions = {
                  method: "GET",
                  header: {"Access-Control-Allow-Origin": "GET"}
              };
                fetch("http://api.plos.org/search?q=title:DNA", requestOptions)
                  .then(
                      (response) =&gt; {
                          console.log(response.json());
                      }
                  );
          }
  
          getValue();
  </code></pre>
  
  <p>I am getting CORS issue like,</p>
  
  <pre><code>Access to fetch at 'http://api.plos.org/search?q=title:DNA' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
  </code></pre>
  
  <p><strong>I tried all the possibilities which available in stack-overflow. But no luck.</strong> 
  Any help would be much appreciated. 
  JSFiddle link - <a href="https://jsfiddle.net/m45hsekf/" rel="nofollow noreferrer">https://jsfiddle.net/m45hsekf/</a></p>