summaryrefslogtreecommitdiffstats
path: root/examples/mail/mail.cs
diff options
context:
space:
mode:
authorElmer Thomas <elmer@thinkingserious.com>2016-07-22 17:23:28 -0700
committerElmer Thomas <elmer@thinkingserious.com>2016-07-22 17:23:28 -0700
commit6b5e837614da9057dc9cb15add814dd80d355847 (patch)
tree46a5f23620bfbc2154728992090f3ae640fadbbf /examples/mail/mail.cs
parent4c8297a18d636721f878de003a9fffcbb0c618d0 (diff)
downloadsendgrid-csharp-6b5e837614da9057dc9cb15add814dd80d355847.zip
sendgrid-csharp-6b5e837614da9057dc9cb15add814dd80d355847.tar.gz
sendgrid-csharp-6b5e837614da9057dc9cb15add814dd80d355847.tar.bz2
Update dependency for async fix
Diffstat (limited to 'examples/mail/mail.cs')
-rw-r--r--examples/mail/mail.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/mail/mail.cs b/examples/mail/mail.cs
index 64ec761..cad9aa3 100644
--- a/examples/mail/mail.cs
+++ b/examples/mail/mail.cs
@@ -9,7 +9,7 @@ dynamic sg = new SendGrid.SendGridAPIClient(_apiKey);
// Create a batch ID
// POST /mail/batch
-dynamic response = sg.client.mail.batch.post();
+dynamic response = await sg.client.mail.batch.post();
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
@@ -20,7 +20,7 @@ Console.ReadLine();
// GET /mail/batch/{batch_id}
var batch_id = "test_url_param";
-dynamic response = sg.client.mail.batch._(batch_id).get();
+dynamic response = await sg.client.mail.batch._(batch_id).get();
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());
@@ -171,7 +171,7 @@ string data = @"{
}";
Object json = JsonConvert.DeserializeObject<Object>(data);
data = json.ToString();
-dynamic response = sg.client.mail.send.post(requestBody: data);
+dynamic response = await sg.client.mail.send.post(requestBody: data);
Console.WriteLine(response.StatusCode);
Console.WriteLine(response.Body.ReadAsStringAsync().Result);
Console.WriteLine(response.Headers.ToString());