Skip to content

How do I do async await's with the new API? #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jahmai-ca opened this issue Jun 16, 2016 · 2 comments
Closed

How do I do async await's with the new API? #238

jahmai-ca opened this issue Jun 16, 2016 · 2 comments
Labels
status: duplicate duplicate issue

Comments

@jahmai-ca
Copy link

As per the topic. While the new API provides the full v3 API functionality, which is welcome, it seems like a huge step back in C# API design.

How do I 'await' the API calls - we simply do not do synchronous network calls in our system (and frankly, nobody should be writing code that does them anymore).

@jahmai-ca
Copy link
Author

jahmai-ca commented Jun 16, 2016

More specifically, how do I do the following with the new API:

SendGridMessage message = new SendGridMessage
                                      {
                                          To = new[] { from },
                                          Bcc = emailAddresses.ToArray(),
                                          From = from,
                                          Subject = subject,
                                          Html = body,
                                      };
            WebTransport transport = new WebTransport(_settings.Credentials);
            await transport.DeliverAsync(message);

@thinkingserious thinkingserious added the status: duplicate duplicate issue label Jun 16, 2016
@thinkingserious
Copy link
Contributor

Hello @jahmai,

Thanks for the feedback!

This issue is related to #235 which I will be digging into today. Please follow that ticket for progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate duplicate issue
Projects
None yet
Development

No branches or pull requests

2 participants