Closed koshdim closed 4 years ago
I've found the problem. It was in backend ASP.Net Core service, configuration must be in this exact sequence:
app.UseCors(...);
app.UseODataBatching();
app.UseRouting();
then the original problem is resolved.
But I got another, 404 error for internal requests, because the library generates requests like this:
GET /Clients HTTP/1.1
and backend couldn't route such requests correctly. requests worked with full path there, but not with relative.
I resolved this issue by running requests like this:
batch.post((b) => {
odata.entitySet( `api/V1/odata/Clients`).get().subscribe(console.log);
odata.entitySet( `api/V1/odata/Projects`).get().subscribe(console.log);
}).subscribe(console.log);
I would suggest configuration option to specify full path for internal requests.
code sample to reproduce:
batch produces these errors in Browser's console
is this a configuration issue? did I miss something?