JavaScript Discussion Forums

There's no such thing as a stupid question. Ask. Discuss. Learn.

forum subscription

Wanna help programmers by answering latest JavaScript questions?

We will email you whenever a new question is posted in JavaScript section. Max 2 emails per week.

How to access JSON Data From a URL.

Hi , all
I am Developing a web application one requirements is there like , Have to fecth JSON Data from a url (http://stageadmin.workfridge.com//api//iot//EDCABINET02//user//list) . using JavaScript.
Facing the following issue .

			  "  Access to fetch at 'http://stageadmin.workfridge.com//api//iot//EDCABINET02//user//list' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your  needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.index.html:1 Uncaught (in promise) TypeError: Failed to fetch." using javascript.

in palce of this url(http://stageadmin.workfridge.com//api//iot//EDCABINET02//user//list) if i use someone other url which having the JSON data content that time application is working properly / JSON Data is comming.
Not only that in palce Javascript if i use C and Java that time JSON data is comming from this url. (http://stageadmin.workfridge.com//api//iot//EDCABINET02//user//list)

Will be Greatful to have some support from forum .
Thanks & Regards,
Rahul.

Rahul Samanta 2 months ago
  • Whitelisted Links