title: angular http - request returns 200 OK, but an error event is fired instead of success
body: <p>I make an https request to outer service in <a href="http://transltr.org/" rel="nofollow noreferrer">http://transltr.org/</a>.</p>
  
  <pre><code>var reqUrl = "http://transltr.org/api/translate?text=dog&amp;to=he";
  
        var deferred = $q.defer();
            $http.get(reqUrl).then(function(response) {
                      deferred.resolve(response);
                     alert("sada");
           },function (error) {
                               deferred.reject(error);
                           });
  
  
            return deferred.promise;
  </code></pre>
  
  <p>rrsponse is 200, and I get data:</p>
  
  <p><a href="https://i.stack.imgur.com/SbcUA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SbcUA.png" alt="enter image description here"></a></p>
  
  <p>but error alert fired. There is a way to get this data?</p>
  
  <p>I also see error in console :</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load <a href="http://transltr.org/api/translate?text=dog&amp;to=he" rel="nofollow noreferrer">http://transltr.org/api/translate?text=dog&amp;to=he</a>. The 'Access-Control-Allow-Origin' header contains multiple values '*, *', but only one is allowed. Origin '<a href="http://myDomain.co.il" rel="nofollow noreferrer">http://myDomain.co.il</a>' is therefore not allowed access.</p>
  </blockquote>
  
  <p>I also tried this version(in this case, no response at all):</p>
  
  <pre><code>   var reqUrl = "http://transltr.org/api/translate";
   var params = {
    to: to,
    text: text
    };
  
        var deferred = $q.defer();
          var request = {
                        method: 'GET',
                        url: reqUrl,
                        dataType: "json",
                        contentType: "application/json; charset=utf-8",
                        headers: {
                            'Content-Type': 'application/json',
                            'Cache-Control': 'no-cache',
                            'X-Requested-With': 'XMLHttpRequest',
                            'Access-Control-Allow-Origin': '*'
                        },
                        params: params
                    };
  
  
            $http(request).success(function (data) {
                deferred.resolve(data);
            }).error(function (error) {
                deferred.reject(error);
            });
  </code></pre>