(method)
| 8532 | } |
| 8533 | |
| 8534 | function createXhr(method) { |
| 8535 | //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest |
| 8536 | //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest |
| 8537 | //if it is available |
| 8538 | if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) || |
| 8539 | !window.XMLHttpRequest)) { |
| 8540 | return new window.ActiveXObject("Microsoft.XMLHTTP"); |
| 8541 | } else if (window.XMLHttpRequest) { |
| 8542 | return new window.XMLHttpRequest(); |
| 8543 | } |
| 8544 | |
| 8545 | throw minErr('$httpBackend')('noxhr', "This browser does not support XMLHttpRequest."); |
| 8546 | } |
| 8547 | |
| 8548 | /** |
| 8549 | * @ngdoc service |
no test coverage detected