@@ -57,7 +57,7 @@ public async Task<Tuple<ResponseInfo, string>> DownloadAsync(string url)
5757 Tuple < ResponseInfo , string > response ;
5858 try
5959 {
60- Tuple < ResponseInfo , byte [ ] > raw = await DownloadRawAsync ( url ) ;
60+ Tuple < ResponseInfo , byte [ ] > raw = await DownloadRawAsync ( url ) . ConfigureAwait ( false ) ;
6161 response = new Tuple < ResponseInfo , string > ( raw . Item1 , raw . Item2 . Length > 0 ? _encoding . GetString ( raw . Item2 ) : "{}" ) ;
6262 }
6363 catch ( WebException e )
@@ -91,7 +91,7 @@ public async Task<Tuple<ResponseInfo, byte[]>> DownloadRawAsync(string url)
9191 webClient . Encoding = _encoding ;
9292 webClient . Headers = _webClient . Headers ;
9393
94- byte [ ] data = await _webClient . DownloadDataTaskAsync ( url ) ;
94+ byte [ ] data = await _webClient . DownloadDataTaskAsync ( url ) . ConfigureAwait ( false ) ;
9595 ResponseInfo info = new ResponseInfo ( )
9696 {
9797 Headers = webClient . ResponseHeaders
@@ -108,7 +108,7 @@ public Tuple<ResponseInfo, T> DownloadJson<T>(string url)
108108
109109 public async Task < Tuple < ResponseInfo , T > > DownloadJsonAsync < T > ( string url )
110110 {
111- Tuple < ResponseInfo , string > response = await DownloadAsync ( url ) ;
111+ Tuple < ResponseInfo , string > response = await DownloadAsync ( url ) . ConfigureAwait ( false ) ;
112112 return new Tuple < ResponseInfo , T > ( response . Item1 , JsonConvert . DeserializeObject < T > ( response . Item2 , JsonSettings ) ) ;
113113 }
114114
@@ -138,7 +138,7 @@ public async Task<Tuple<ResponseInfo, string>> UploadAsync(string url, string bo
138138 Tuple < ResponseInfo , string > response ;
139139 try
140140 {
141- Tuple < ResponseInfo , byte [ ] > data = await UploadRawAsync ( url , body , method ) ;
141+ Tuple < ResponseInfo , byte [ ] > data = await UploadRawAsync ( url , body , method ) . ConfigureAwait ( false ) ;
142142 response = new Tuple < ResponseInfo , string > ( data . Item1 , data . Item2 . Length > 0 ? _encoding . GetString ( data . Item2 ) : "{}" ) ;
143143 }
144144 catch ( WebException e )
@@ -171,7 +171,7 @@ public async Task<Tuple<ResponseInfo, byte[]>> UploadRawAsync(string url, string
171171 webClient . Proxy = null ;
172172 webClient . Encoding = _encoding ;
173173 webClient . Headers = _webClient . Headers ;
174- byte [ ] data = await _webClient . UploadDataTaskAsync ( url , method , _encoding . GetBytes ( body ) ) ;
174+ byte [ ] data = await _webClient . UploadDataTaskAsync ( url , method , _encoding . GetBytes ( body ) ) . ConfigureAwait ( false ) ;
175175 ResponseInfo info = new ResponseInfo
176176 {
177177 Headers = _webClient . ResponseHeaders
@@ -188,7 +188,7 @@ public Tuple<ResponseInfo, T> UploadJson<T>(string url, string body, string meth
188188
189189 public async Task < Tuple < ResponseInfo , T > > UploadJsonAsync < T > ( string url , string body , string method )
190190 {
191- Tuple < ResponseInfo , string > response = await UploadAsync ( url , body , method ) ;
191+ Tuple < ResponseInfo , string > response = await UploadAsync ( url , body , method ) . ConfigureAwait ( false ) ;
192192 return new Tuple < ResponseInfo , T > ( response . Item1 , JsonConvert . DeserializeObject < T > ( response . Item2 , JsonSettings ) ) ;
193193 }
194194
0 commit comments