File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/Elasticsearch.Net/Connection Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11#if DOTNETCORE
22using System ;
33using System . Collections . Concurrent ;
4+ using System . Collections . Generic ;
45using System . IO ;
56using System . IO . Compression ;
67using System . Net ;
@@ -92,7 +93,9 @@ public virtual async Task<ElasticsearchResponse<TReturn>> RequestAsync<TReturn>(
9293 var response = await client . SendAsync ( requestMessage , cancellationToken ) . ConfigureAwait ( false ) ;
9394 requestData . MadeItToResponse = true ;
9495 builder . StatusCode = ( int ) response . StatusCode ;
95- builder . DeprecationWarnings = response . Headers . GetValues ( "Warning" ) ;
96+ IEnumerable < string > warnings ;
97+ if ( response . Headers . TryGetValues ( "Warning" , out warnings ) )
98+ builder . DeprecationWarnings = warnings ;
9699
97100 if ( response . Content != null )
98101 builder . Stream = await response . Content . ReadAsStreamAsync ( ) . ConfigureAwait ( false ) ;
You can’t perform that action at this time.
0 commit comments