@@ -20,6 +20,7 @@ public class SendGridClient : BaseClient
20
20
/// <param name="requestHeaders">A dictionary of request headers.</param>
21
21
/// <param name="version">API version, override AddVersion to customize.</param>
22
22
/// <param name="urlPath">Path to endpoint (e.g. /path/to/endpoint).</param>
23
+ /// <param name="httpErrorAsException">Indicates whether HTTP error responses should be raised as exceptions. Default is false.</param>
23
24
/// <returns>Interface to the Twilio SendGrid REST API.</returns>
24
25
public SendGridClient ( IWebProxy webProxy , string apiKey , string host = null , Dictionary < string , string > requestHeaders = null , string version = null , string urlPath = null , bool httpErrorAsException = false )
25
26
: base ( webProxy , buildOptions ( apiKey , host , requestHeaders , version , urlPath , httpErrorAsException ) )
@@ -35,6 +36,7 @@ public SendGridClient(IWebProxy webProxy, string apiKey, string host = null, Dic
35
36
/// <param name="requestHeaders">A dictionary of request headers.</param>
36
37
/// <param name="version">API version, override AddVersion to customize.</param>
37
38
/// <param name="urlPath">Path to endpoint (e.g. /path/to/endpoint).</param>
39
+ /// <param name="httpErrorAsException">Indicates whether HTTP error responses should be raised as exceptions. Default is false.</param>
38
40
/// <returns>Interface to the Twilio SendGrid REST API.</returns>
39
41
public SendGridClient ( HttpClient httpClient , string apiKey , string host = null , Dictionary < string , string > requestHeaders = null , string version = null , string urlPath = null , bool httpErrorAsException = false )
40
42
: base ( httpClient , buildOptions ( apiKey , host , requestHeaders , version , urlPath , httpErrorAsException ) )
@@ -50,6 +52,21 @@ public SendGridClient(HttpClient httpClient, string apiKey, string host = null,
50
52
/// <param name="version">API version, override AddVersion to customize.</param>
51
53
/// <param name="urlPath">Path to endpoint (e.g. /path/to/endpoint).</param>
52
54
/// <returns>Interface to the Twilio SendGrid REST API.</returns>
55
+ public SendGridClient ( string apiKey , string host = null , Dictionary < string , string > requestHeaders = null , string version = null , string urlPath = null )
56
+ : base ( buildOptions ( apiKey , host , requestHeaders , version , urlPath , false ) )
57
+ {
58
+ }
59
+
60
+ /// <summary>
61
+ /// Initializes a new instance of the <see cref="SendGridClient"/> class.
62
+ /// </summary>
63
+ /// <param name="apiKey">Your Twilio SendGrid API key.</param>
64
+ /// <param name="host">Base url (e.g. https://api.sendgrid.com).</param>
65
+ /// <param name="requestHeaders">A dictionary of request headers.</param>
66
+ /// <param name="version">API version, override AddVersion to customize.</param>
67
+ /// <param name="urlPath">Path to endpoint (e.g. /path/to/endpoint).</param>
68
+ /// <param name="httpErrorAsException">Indicates whether HTTP error responses should be raised as exceptions. Default is false.</param>
69
+ /// <returns>Interface to the Twilio SendGrid REST API.</returns>
53
70
public SendGridClient ( string apiKey , string host = null , Dictionary < string , string > requestHeaders = null , string version = null , string urlPath = null , bool httpErrorAsException = false )
54
71
: base ( buildOptions ( apiKey , host , requestHeaders , version , urlPath , httpErrorAsException ) )
55
72
{
0 commit comments