0

is there any way to send http request without XMLHttpReqeust? or sending http request with socket programing in browser javascript?

Mahdi Aslami Khavari
  • 1,755
  • 15
  • 23
  • fetch? https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch – Will Apr 23 '20 at 03:59
  • I want to write an online app like postman. so fetch does not work for me because of CORS policy i can't sent request to localhost of everyone. – Mahdi Aslami Khavari Apr 23 '20 at 04:02
  • 1
    Use a server as a proxy for your calls. NodeJS is the way to go to do it fast, clean and async. Thats the only way to avoid CORS ;) – chq Apr 23 '20 at 04:09
  • @MahdyAslamy: *:..because of CORS ..."* - it would be bad if there would be a way to bypass a security measure like CORS just by doing it differently. – Steffen Ullrich Apr 23 '20 at 06:07

0 Answers0