@@ -22,7 +22,7 @@ public class SendGridClient : BaseClient
22
22
/// <param name="urlPath">Path to endpoint (e.g. /path/to/endpoint).</param>
23
23
/// <returns>Interface to the Twilio SendGrid REST API.</returns>
24
24
public SendGridClient ( IWebProxy webProxy , string apiKey , string host = null , Dictionary < string , string > requestHeaders = null , string version = null , string urlPath = null , bool httpErrorAsException = false )
25
- : base ( webProxy , buildOptions ( apiKey , host , requestHeaders , version , urlPath ) )
25
+ : base ( webProxy , buildOptions ( apiKey , host , requestHeaders , version , urlPath , httpErrorAsException ) )
26
26
{
27
27
}
28
28
@@ -37,7 +37,7 @@ public SendGridClient(IWebProxy webProxy, string apiKey, string host = null, Dic
37
37
/// <param name="urlPath">Path to endpoint (e.g. /path/to/endpoint).</param>
38
38
/// <returns>Interface to the Twilio SendGrid REST API.</returns>
39
39
public SendGridClient ( HttpClient httpClient , string apiKey , string host = null , Dictionary < string , string > requestHeaders = null , string version = null , string urlPath = null , bool httpErrorAsException = false )
40
- : base ( httpClient , buildOptions ( apiKey , host , requestHeaders , version , urlPath ) )
40
+ : base ( httpClient , buildOptions ( apiKey , host , requestHeaders , version , urlPath , httpErrorAsException ) )
41
41
{
42
42
}
43
43
@@ -50,8 +50,8 @@ public SendGridClient(HttpClient httpClient, string apiKey, string host = null,
50
50
/// <param name="version">API version, override AddVersion to customize.</param>
51
51
/// <param name="urlPath">Path to endpoint (e.g. /path/to/endpoint).</param>
52
52
/// <returns>Interface to the Twilio SendGrid REST API.</returns>
53
- public SendGridClient ( string apiKey , string host = null , Dictionary < string , string > requestHeaders = null , string version = null , string urlPath = null )
54
- : base ( buildOptions ( apiKey , host , requestHeaders , version , urlPath ) )
53
+ public SendGridClient ( string apiKey , string host = null , Dictionary < string , string > requestHeaders = null , string version = null , string urlPath = null , bool httpErrorAsException = false )
54
+ : base ( buildOptions ( apiKey , host , requestHeaders , version , urlPath , httpErrorAsException ) )
55
55
{
56
56
}
57
57
@@ -76,7 +76,7 @@ public SendGridClient(HttpClient httpClient, SendGridClientOptions options)
76
76
{
77
77
}
78
78
79
- private static SendGridClientOptions buildOptions ( string apiKey , string host , Dictionary < string , string > requestHeaders , string version , string urlPath )
79
+ private static SendGridClientOptions buildOptions ( string apiKey , string host , Dictionary < string , string > requestHeaders , string version , string urlPath , bool httpErrorAsException )
80
80
{
81
81
return new SendGridClientOptions
82
82
{
@@ -85,6 +85,7 @@ private static SendGridClientOptions buildOptions(string apiKey, string host, Di
85
85
RequestHeaders = requestHeaders ?? DefaultOptions . RequestHeaders ,
86
86
Version = version ?? DefaultOptions . Version ,
87
87
UrlPath = urlPath ?? DefaultOptions . UrlPath ,
88
+ HttpErrorAsException = httpErrorAsException
88
89
} ;
89
90
}
90
91
}
0 commit comments