Questions tagged [xmlhttprequest]

XMLHttpRequest (XHR) is a JavaScript object that exposes an API for making asynchronous HTTP requests from frontend code running a Web browser — that is, for enabling the programming technique known as AJAX. The XHR API is a legacy API. It has been superseded by the Fetch API.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Task 3 – Upload an AppBundle to Design Automation - Http Request Power Automate - Autodesk Forge

https://aps.autodesk.com/en/docs/design-automation/v3/tutorials/autocad/task3-upload-appbundle/ How do I implement the task 3 using power automate? I'm having problems in the Upload of the AppBundle ...
0 votes
1 answer
18 views

Is there any way you can get the meta tag description of another website in vanilla javascript

So i have a list of websites inside of a JSON file, for this example i am only going to use google though. Now lets say i want to use vanilla js to inform the user about all of the websites in my list ...
0 votes
0 answers
18 views

How to run javascript code in XMLHttpRequest before returning response?

I want to list ALL the files in this shared Google Drive folder using XMLHttpRequest in Javascript. I can successfully do this using the below snippet: function getSourceAsDOM(url) { xmlhttp = new ...
0 votes
0 answers
12 views

Problem with Slim4, XMLHTTP request works fine in localhost but not on the web

Have tried many permutations and many work on localhost but get 404 error on the web index.php is in root/public and I have .htaccess in that directory as follows RewriteEngine On RewriteCond %{...
0 votes
0 answers
15 views

How do I replace chrome.webRequest.onBeforeRequest with declarativeNetRequest?

I'm using a Chrome extension I've built to intercept and redirect some assets that are loaded on a page. To do this, I'm relying on the chrome.webRequest.onBeforeRequest API and it's working fine. ...
  • 4,062
0 votes
0 answers
15 views

ERR_CONNECTION_CLOSED when using setinterval fetchAPI

I get ERR_CONNECTION_CLOSED when I fetch data from a php file using JS Fetch API(inside setinterval of 4 seconds which is way too long time to get an error for it) NOTE: The PHP file gets only newly ...
0 votes
0 answers
27 views

Problem with getting data using XMLHttpRequest [closed]

I have problem with getting data from server (computer on other network) using XMLHttpRequest. If I type URL directly in browser it shows json text, but not this way. The code is: document....
  • 1
0 votes
0 answers
36 views

JS - GET .php file on webserver gives 404

I am trying to load some data from a MySQL database into an HTML website. My approach at the moment is a PHP script that returns the database data as JSON and then a JS script that uses this data for ...
  • 141
1 vote
0 answers
20 views

Async chunked JS file upload to Flask backend on Debian

I want to implement a chunked file upload for .tar files without libs (with the exception of Flask). This code works only if i upload in sync xhr.open(async=false) mode (JavaScript) but if i change it ...
  • 185
-1 votes
0 answers
31 views

Enabling CORS through IIS

I am having an issue with CORS policy and specific requests being blocked by my browser. I have an IIS web server that serves certain content, but when I try to display it within an iframe on a ...
-1 votes
1 answer
25 views

Javascript FETCH with digital signature certificate

Good day, I'm trying to do a fetch in an web app to our Tax Authorities, but que XML request needs to be signed by a digital certificate, I've the certificate installed on my browser but cannot get a ...
0 votes
1 answer
29 views

CORS blocking POST http token call on nginx

I have a local nginx server runing on a macOS (M2) on localhost:80 and I'm trying to connect an Ionic 5 app running on localhost:8100 brew services running: mysql ~/Library/LaunchAgents/homebrew....
  • 606
0 votes
0 answers
31 views

Download large file shared as presigned url in javascript

I have the following use case. We are using AWS presigned url which is SSE-C signed. We need to pass the required headers to use and download from the presigned url. I have the below mentioned code ...
  • 839
0 votes
1 answer
18 views

Blazor server app with cors enabled still blocking requests

I have a blazor server app with the following configurations in program.cs: builder.Services.AddCors(options => { options.AddPolicy(name: "NewPolicy", policy =&...
  • 762
0 votes
0 answers
19 views

CORS policy error stemming from private network

I have a React app and Express server hosted on the same Ubuntu instance. However I'm getting the following error when I try to log into the app: Access to XMLHttpRequest at 'http://localhost:4000/...
0 votes
0 answers
25 views

What is the DWIMS Process in Android?

I get following error in the adb logcat while having a Android 11 Device connected via USB. It occurs after calling an API using XMLHttpRequest from a JS File inside WebView which is in the Main ...
  • 150
0 votes
0 answers
22 views

How can I do an API call from an Android Device in JavaScript

I am trying to get Data from a Server on an Android Device inside a WebView. Inside this WebView I have JavaScript Code that should execute the API call. The JavaScript code works in the Browser ...
  • 150
0 votes
0 answers
21 views

How to send client certificate with api request to server in JavaScript?

I have an example API with is secured by SSL cert, I tried a lot to send the cert along with the XMLHttpRequest but that's not working then I tried with Postman after adding the cert in settings and ...
  • 1,674
0 votes
0 answers
17 views

'readystatechange' doesn't seem to work with the XMLHttpRequest

I'm trying to get data from jsonplaceholder with XMLHttpRequest(), however, my readystatechange event doesn't work. I tried to change the request.addEventListener('readystatechange'... to document....
  • 1
0 votes
0 answers
38 views

What is the difference in the calls to "this" in nested XMLHttpRequest()? [duplicate]

I'm new to JavaScript and have run into an issue in calling the XMLHttpRequest function. My code is as follows: document.addEventListener('load', loadJsonFile(), false); function reqListener() { ...
  • 13
0 votes
1 answer
28 views

Retrieve FullCalendar events from database using events as a function in angular

I am trying to load my fullcalendar events from my database using the events field from CalendarOptions as shown below. calendarOptions: CalendarOptions = { plugins: [timeGridPlugin, ...
0 votes
2 answers
43 views

Ajax XMLHttpRequest.Upload returning null and "progress" eventListener not working even though the file has been uploaded

To learn more JavaScript and PHP, I am currently working on a small private project that allows me to upload single or multiple files to my server via PHP. The file/s get sent to the PHP script via ...
0 votes
0 answers
10 views

Getting Authentication Steps and Saving Auth Header

I have an app that crawl websites. I need to get users auth header (cookies, Authorization) to crawl as logged in user from our web app. I found a great gif represent close view to what i need. https:/...
0 votes
0 answers
9 views

POST Request not working ( probably because of some request header missing ) Python Request automation

first , im just starting on http requests , im trying to learn automation using http requests , due to its speed . well i installed the requests lib , on python and tried some simple sites with GET ...
0 votes
0 answers
10 views

XMLHttpRequest has been blocked by CORS policy [duplicate]

I am currently trying to connect my web client to its back-end architecture. Everything is set as it should and everything seems to be working correctly, except that I have got the following error: ...
  • 1
0 votes
0 answers
20 views

How to Send form data from java Script to java filter?

I am trying to send my form data which contains image file from java script to java servlet filter. The following is the code for ajax request. function displayCard() { addProductBtn.disabled = true;...
1 vote
0 answers
22 views

How produce FormData object from custom object

I'm trying to form a FormData object before having the data from the form as a regular object. But at the output I get an empty FormData object const submitForm = ( variables = {} ): Promise<any>...
0 votes
0 answers
11 views

Why does my if loop with xhr not return any data?

I need this to return a value, but currently I don't get the console log "FetchNewsData() xhr.readyState started"(line 11), telling me that the if loop doesn't run, but why? Please help. ...
0 votes
0 answers
14 views

xhr setinterval and settimeout abort the auto get

please find the codepen here: codepen the code is work when i clicked "Change Content" but "Cancel" not work. Any hint my coding something wrong? const xhttp = new XMLHttpRequest();...
0 votes
0 answers
10 views

How do I block all ajax calls from local files?

I would like to find a way to prevent any page that I have saved or created locally from connecting to the internet in any way. I would like to use firefox but I could use another browser if I can't ...
  • 119
-4 votes
1 answer
40 views

PHP failed to submit the html form

below is simple PHP script to validate and successfully submit the form to the server I've added xhr(XMLHttpRequest) to make it efficient.First it was supposed to check if the input fields are empty ...
  • 241
0 votes
1 answer
48 views

Can someone please tell me how to get js code to wait until a http request fully completes before moving onto a different function?

Ive been struggling for a while to get this code to work properly. Basically im hitting an api to get values and add them to a table. My great idea was to take the parameter im sending from the ...
1 vote
1 answer
24 views

XMLHttpRequest post params containing ampersand

How would I use XMLHttpRequest if I need to send some parameters that might contain '&' sign (without knowing which one or if any might contain it). Of course if there is an '&' sing it will ...
  • 4,350
0 votes
0 answers
37 views

How to parse HTML Form array and associative array in javascript for XMLHttpRequest

How to pass and process HTML Form array and associative array in javascript, so that the processed data can be posted through XMLHttpRequest to .php for further processing? Thanks! Here is my semi ...
0 votes
0 answers
20 views

Browser is blocking images and API calls

When my page loads it requests /settings to load settings. This worked yesterday but today Firefox has started blocking this saying Blocked by DevTools The favicon is also being blocked. Firefox ...
0 votes
1 answer
25 views

jQuery Ajax XMLHttpRequest Progress Listener

I am trying to add a progress bar to each upload of an asynchronous form for a Django website. My code is as follows. I'm not sure why, but at some point recently, I stopped being able to see the ...
-4 votes
0 answers
27 views

Send value from javascript to python and render a tamplate

I hava a page Html where I want to send a data from a function in javascript and, after elaborated it, render a new template. In html function nuovo(){ var h_n=document.getElementById('cl_nuovo')....
-1 votes
0 answers
37 views

change the user-agent sent in requests in tamper-monkey

I want to intercept all requests (or do anything) change the user-agent header that is sent out with each request. I tried using this XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = ...
0 votes
0 answers
7 views

XHR error on request response from seperate server in Next.Js and Express.Js

I have a register form created in Next.js and I am sending the request with Data to http://localhost:8888/api/user/register. New user gets created succeesfully, however I am receiving XHR error, and I ...
  • 183
0 votes
1 answer
35 views

Create an embed code to allow affiliate to display information from my website

I am trying to create a script (jQuery) that I give to an affiliate partner which will allow them to display the contents of my DIV on their website. I have seen this done before but cannot find any ...
0 votes
0 answers
14 views

curl convertion to xhr fails [duplicate]

here is my curl line which works flawlessly : curl -D- -u user:pwd -X POST -H "X-Atlassian-Token: nocheck" -F "file=@test.txt" https://domain/csbugtrack/rest/api/2/issue/584025/...
1 vote
0 answers
18 views

503 error in browser on fetch despite nginx logging 200 success status

Within my app, there's some fetch requests to the server that work without issue for almost all users. There's no problem within the server in responding, and I've watched the logs live, and it ...
  • 589
0 votes
2 answers
59 views

Best strategy for displaying and searching XML data as an HTML table

I am trying to define the best overall strategy to display XML-based terminological entries as a searchable table in an HTML page. It is important that the chosen strategy can: reproduce the ...
0 votes
0 answers
16 views

JQUERY GET error if set header Authorization

I used jquery V3.6.3 method: GET if I set header Authorization value, it don't work. this work $.ajax({ type: "GET", url:'https://........../test', success: ...
0 votes
0 answers
13 views

React app w/ threejs: Stuff stops working when I reload. Also, unable to change y and z dimensions

So there are two issues. The first is that whenever I save my file with the localhost running, all of my code seems to work just fine, but as soon as I reload the page or try to get to the page from ...
0 votes
1 answer
44 views

insert data in new row in javascript

we get data with XMLHttpRequest from costume( mocki.io and fake json) url, I want to insert name and city in new tag! but in this code set all data element.name and element.city in one table row!! we ...
-1 votes
0 answers
14 views

On XHR send, i get message Can't parse postData:

I don't understand what could be the problem function sendXHR() { let requestParams = [{ __class__: "ServerRequest", requestData: [851648510], requestClass: &...
0 votes
1 answer
18 views

Which Angular TS code should I use to communicate with the backend server and why? One solution is XMLHttpRequest and the other HttpRequest, both work

I tried both solutions and they both work great. The XMLHttpRequest seems simpler to me. Are there pros and cons, what are some examples? Thanks in advance onRunJS030823d() { alert("...
0 votes
0 answers
19 views

How do I automate tasks that depend on http requests?

Let's say, I intend to automate tasks like "follow" or "like" on my social media account. So, the questions are: Can I achieve this with JavaScript or PHP? How? Do I need a third ...
  • 7
1 vote
0 answers
12 views

Javascript cors error: consume an ODataV4 Rest API "PATCH" endpoint with ntlm authentication

I'm trying to consume an ODataV4 Rest Api to update the metadata of an invoice but I always end up with a cors error. Here is the code snippet thet I am using: var data = JSON.stringify({"Status&...

1
2 3 4 5
240