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

Filtering Json response updating mongodb database

I'm trying to filter a json response and use the filtered response to update several documents in my mongodb collection. The Json response looks like this: {"88996940":{"charge":"5","start_count":"10","status":"Completed","remains":"90","currency":"USD"}, "88996961":{"charge":"8","start_count":"50","status":"Completed","remains":"50","currency":"USD"}, "88999796":{"charge":"7","start_count":"80","status":"Completed","remains":"20","currency":"USD"}} "88996940","88996961" and "88999796" are the order id's. I want to filter…

VIEW QUESTION
Back To Top
Search