xmlhttprequest

Firefox exception 'JavaScript component does not have a method named: “available”'

让人想犯罪 __ 提交于 2019-12-17 19:20:04
问题 I'm building a web app with Django. I have a bunch of API calls in Javascript via Ajax (jQuery v1.8.3). Most of them work, but a particular one results in a return object with status 0 and this message as the statusText: [Exception... "'JavaScript component does not have a method named: "available"' when calling method: [nsIInputStream::available]" nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "JS frame :: http://127.0.0.1:8000/media/js/jquery.js :: .send ::

Node js / Angular js - CAUTION: Provisional headers are shown [duplicate]

∥☆過路亽.° 提交于 2019-12-17 19:00:50
问题 This question already has answers here : “CAUTION: provisional headers are shown” in Chrome debugger (32 answers) Closed 5 years ago . This is my Angular js piece code: $http({ method:'POST', withCredential:true, url:$scope.config.app_ws+'auth/signup', data:{user:$scope.auth} }).success(function(status, response){ console.log(response); }).error(function(status, response){ alert(response+'Bummer :( , an error occured plese retry later. '); }); This is my Node.js piece backend: var allow_cross

Hide 401 console.error in chrome dev tools getting 401 on fetch() call [duplicate]

隐身守侯 提交于 2019-12-17 18:46:33
问题 This question already has answers here : Suppress Chrome 'Failed to load resource' messages in console (3 answers) Closed 2 years ago . I have some code where i make a fetch call. This takes advantage of window.fetch api built into modern chrome / firefox. The code sometimes hits a 401:unauthorized response. This is normal and I want it ignored, which I can do with the flow of the code. However, Chrome does show an unsightly console.error message when I try to run it. How can I

Stalled and pending ajax requests by JQuery in Chrome

与世无争的帅哥 提交于 2019-12-17 18:26:26
问题 Once in a while, my Ajax calls (via JQuery 1.8) in my application are stuck with status "pending" for a long time (sometimes up to 17 minutes). I've googled it and all possible solutions didn't work: I have no ad blocker installed. I've disabled the "predict network actions to improve page load performance" flag in Chrome. I've also added a query string to the Ajax call to make it unique (to disable any Chrome cache locking). Do you have a any idea how to solve this? Thanks. In the example

How to make Microsoft XmlHttpRequest honor cache control directive

瘦欲@ 提交于 2019-12-17 18:26:22
问题 i'm issuing a request using MSXML's XmlHttpRequest object: IXMLHttpRequest http = new XmlHttpRequest(); http.open("GET", "http://www.bankofcanada.ca/stat/fx-xml.xml", False, "", ""); http.send(); And the send succeeds, and i get my xml data. Except that XmlHttpRequest didn't actually hit the network (i can see there no actual http request issued). And Process Monitor shows the file is actually being served from my cache: So i want to instruct the XmlHttpRequest user agent that any cached

jQuery.ajax() inside a loop [duplicate]

为君一笑 提交于 2019-12-17 18:14:15
问题 This question already has answers here : JavaScript closure inside loops – simple practical example (44 answers) Closed 3 years ago . If I call jQuery.ajax() inside a loop, would it cause the call in current iteration overwrite the last call or a new XHR object is assigned for the new request? I have a loop that do this, while from console log I can see requests done 200 ok but just the result data of the last request in the loop is stored by the request success callback as supposed . the

Ajax - 'Origin localhost is not allowed by Access-Control-Allow-Origin'

时光总嘲笑我的痴心妄想 提交于 2019-12-17 17:00:45
问题 I'm relatively new to Ajax and was just tasked with this cross-domain call. We have a text box on our web page that a user will use to preform a search of company names. By clicking a button next to the text box, the Ajax call will be requested. Unfortunately the web service is located in a separate domain, so this is naturally causing issues. Below is my best attempt at making this work. I should also note, the purpose of this call is to return the results in an XML format, which will be

How to use JSONP to overcome XSS issue?

﹥>﹥吖頭↗ 提交于 2019-12-17 16:52:41
问题 I have a piece of javascript executing on a jetty server which is sending a XMLHTTPRequest to a scoket on another server(wamp server). The request gets sent to the socket, however the XHR response seems to be getting blocked. I have heard that I can use JSONP to overcome this problem. However as I am new to both javascript and I have never used JSONP technique before I would greatly appreciate any help in how to use this technique? function sendPost(url, postdata, callback) { xmlHttp

Can't use HTTPS with ServerXMLHTTP object

旧巷老猫 提交于 2019-12-17 16:17:39
问题 I am supporting a Classic ASP application that connects to a payment gateway via HTTPS. Up until recently there have been no issues. A few days ago the latest updates were installed on the server (Windows Server 2003) and caused the site to break. A code snippet is below. Dim oHttp Dim strResult Set oHttp = CreateObject("MSXML2.ServerXMLHTTP") oHttp.setOption(2) = 13056 oHttp.open "POST", SOAP_ENDPOINT, false oHttp.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8" oHttp

xmlhttprequest and set-cookie & cookie

折月煮酒 提交于 2019-12-17 15:58:11
问题 i think i misunderstood the management of cookies with xmlhttprequest. I have a server that response to the XMLHttpRequest made in javascript, my server returns Allow-Control-Access-Origin , Access-Control-Allow-Headers , Access-Control-Expose-Headers and Access-Control-Allow-Credentials headers with the correct value. I'm doing a Digest Authenticate in a server with javascript, no problem in that, i receive ok the WWW-Authenticate header from server, i process and send to the server the