I'm trying fetch user object from an API, I get response code 200 but data is null. I tried copy the request url to browser - I get json object, same in Postman.
fetch(url,config)
.then(response => response.json())
.then((data) => {
console.log('Success:', data);
})
.catch((error) => {
console.error('Error:', error);
});