Trying to make a request to this resource: https://crowdcleaning.space/cc1c/ru_RU/odata/standard.odata/?$format=application/json
When i am doing it in browser, everything works fine.
Get a response from a server.
But there is an issue, when i do it in backend.
import {fetch} from 'wix-fetch';
// ...
export async function callback2() {
fetch("https://crowdcleaning.space/cc1c/ru_RU/odata/standard.odata/?$format=application/json",
{ "method": "GET",
"headers": {
"user": 'xxxxxxxx',
"password":'xxxxxx',
}
})
.then( (httpResponse) => {
if (httpResponse.ok) {
return httpResponse.json();
}
else {
return Promise.reject("Fetch did not succeed");
}
} )
.catch( (err) => {
console.log(err);
} );
}
Get this result testing code above:
Can anybody give me an advice how to fix this issue?