File tree 1 file changed +46
-1
lines changed
src/Microsoft.OData.Extensions.Client/Internals/Handlers
1 file changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,51 @@ public override ICredentials Credentials
150
150
this . requestMessage . Properties [ typeof ( ICredentials ) . FullName ] = value ;
151
151
}
152
152
}
153
+
154
+ /// <summary>
155
+ /// Gets or sets the timeout (in seconds) for this request.
156
+ /// </summary>
157
+ public override int Timeout
158
+ {
159
+ get
160
+ {
161
+ return ( int ) this . client . Timeout . TotalSeconds ;
162
+ }
163
+ set
164
+ {
165
+ this . client . Timeout = new TimeSpan ( 0 , 0 , value ) ;
166
+ }
167
+ }
168
+
169
+ public override int ReadWriteTimeout
170
+ {
171
+ get
172
+ {
173
+ return ( int ) this . client . Timeout . TotalSeconds ;
174
+ }
175
+ set
176
+ {
177
+ this . client . Timeout = new TimeSpan ( 0 , 0 , value ) ;
178
+ }
179
+ }
180
+
181
+ #if ! ( NETCOREAPP1_0 || NETCOREAPP2_0 )
182
+ /// <summary>
183
+ /// Gets or sets a value that indicates whether to send data in segments to the Internet resource.
184
+ /// </summary>
185
+ public override bool SendChunked
186
+ {
187
+ get
188
+ {
189
+ bool ? transferEncodingChunked = this . requestMessage . Headers . TransferEncodingChunked ;
190
+ return transferEncodingChunked . HasValue && transferEncodingChunked . Value ;
191
+ }
192
+ set
193
+ {
194
+ this . requestMessage . Headers . TransferEncodingChunked = value ;
195
+ }
196
+ }
197
+ #endif
153
198
154
199
/// <summary>
155
200
/// Returns the value of the header with the given name.
@@ -313,4 +358,4 @@ private static DataServiceTransportException ConvertToDataServiceWebException(We
313
358
return new DataServiceTransportException ( errorResponseMessage , webException ) ;
314
359
}
315
360
}
316
- }
361
+ }
You can’t perform that action at this time.
0 commit comments