thank you for the response. the problem was in the fact that the api was asynchronis and i had to add:
i have included my test project, the problem i have now is that files list remain empty, what changes do i need to make to api controller
public void ConfigureServices(IServiceCollection services)
// Add framework services.
services.AddCors(o => o.AddPolicy("MyPolicy", builder =>
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
app.UseCors("MyPolicy"); // applying to every requests
that did the trick, thank you.