Top "Async-await" questions

This covers the asynchronous programming model supported by various programming languages, using the async and await keywords.

Adding authorization to the headers

I have the following code: ... AuthenticationHeaderValue authHeaders = new AuthenticationHeaderValue("OAuth2", Contract.AccessToken); string result = await PostRequest.AuthenticatedGetData(fullUrl, null, authHeaders); …

c# windows-phone-8 async-await dotnet-httpclient
How do you implement an async action delegate method?

A little background information. I am learning the Web API stack and I am trying to encapsulate all data in …

c# asynchronous asp.net-web-api async-await c#-5.0
Entity Framework SaveChanges() vs. SaveChangesAsync() and Find() vs. FindAsync()

I have been searching for the differences between 2 pairs above but haven't found any articles explaining clearly about it as …

c# entity-framework async-await
How to "await" for a callback to return?

When using a simple callback such as in the example below: test() { api.on( 'someEvent', function( response ) { return response; }); } How …

javascript asynchronous callback async-await ecmascript-2017
Is there any async equivalent of Process.Start?

Like the title suggests, is there an equivalent to Process.Start (allows you run another application or batch file) that …

c# async-await c#-5.0
How to use ES8 async/await with streams?

In https://stackoverflow.com/a/18658613/779159 is an example of how to calculate the md5 of a file using the built-in …

javascript node.js async-await ecmascript-2017
How to return values from async functions using async-await from function?

How can I return the value from an async function? I tried to like this const axios = require('axios'); async …

javascript node.js asynchronous async-await axios
Struggling trying to get cookie out of response with HttpClient in .net 4.5

I've got the following code that works successfully. I can't figure out how to get the cookie out of the …

c# async-await dotnet-httpclient
can not await async lambda

Consider this, Task task = new Task (async () =>{ await TaskEx.Delay(1000); }); task.Start(); task.Wait(); The call task.Wait() does …

c# task-parallel-library async-await async-ctp
Is it possible to await an event instead of another async method?

In my C#/XAML metro app, there's a button which kicks off a long-running process. So, as recommended, I'm using …

c# microsoft-metro .net-4.5 async-await windows-store-apps