skip to Main Content

javascript: Not sending array with fetch api

I am trying to send array with fetch api. but it goes null. javascript: const url = "/TMF/DownloadFolderFilesAsZip"; var data = { method: "POST", body: JSON.stringify({ folderFiles: foldersFiles }), headers: new Headers({ 'content-type': 'application/json' }) } fetch(url, data) .then(resp =>…

VIEW QUESTION

Should I use async with the ASP.NET QueueBackgroundWorkItem method for an async method?

When using QueueBackgroundWorkItem, is there any difference in the below two ways of calling a method that performs async operations like api calls? HostingEnvironment.QueueBackgroundWorkItem(async cancellationToken => { var result = await LongRunningMethodAsync(); }); Or the following: HostingEnvironment.QueueBackgroundWorkItem(cancellationToken => LongRunningMethodAsync()); I'm…

VIEW QUESTION
Back To Top
Search