@@ -276,6 +276,50 @@ public interface IRestRequest
276
276
/// <returns>This request</returns>
277
277
IRestRequest AddParameter ( string name , object value , string contentType , ParameterType type ) ;
278
278
279
+ /// <summary>
280
+ /// Add or update the parameter to the request
281
+ /// </summary>
282
+ /// <param name="p">Parameter to add</param>
283
+ /// <returns></returns>
284
+ IRestRequest AddOrUpdateParameter ( Parameter p ) ;
285
+
286
+ /// <summary>
287
+ /// Adds a HTTP parameter to the request (QueryString for GET, DELETE, OPTIONS and HEAD; Encoded form for POST and PUT)
288
+ /// </summary>
289
+ /// <param name="name">Name of the parameter</param>
290
+ /// <param name="value">Value of the parameter</param>
291
+ /// <returns>This request</returns>
292
+ IRestRequest AddOrUpdateParameter ( string name , object value ) ;
293
+
294
+ /// <summary>
295
+ /// Adds a parameter to the request. There are five types of parameters:
296
+ /// - GetOrPost: Either a QueryString value or encoded form value based on method
297
+ /// - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection
298
+ /// - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId}
299
+ /// - Cookie: Adds the name/value pair to the HTTP request's Cookies collection
300
+ /// - RequestBody: Used by AddBody() (not recommended to use directly)
301
+ /// </summary>
302
+ /// <param name="name">Name of the parameter</param>
303
+ /// <param name="value">Value of the parameter</param>
304
+ /// <param name="type">The type of parameter to add</param>
305
+ /// <returns>This request</returns>
306
+ IRestRequest AddOrUpdateParameter ( string name , object value , ParameterType type ) ;
307
+
308
+ /// <summary>
309
+ /// Adds a parameter to the request. There are five types of parameters:
310
+ /// - GetOrPost: Either a QueryString value or encoded form value based on method
311
+ /// - HttpHeader: Adds the name/value pair to the HTTP request's Headers collection
312
+ /// - UrlSegment: Inserted into URL if there is a matching url token e.g. {AccountId}
313
+ /// - Cookie: Adds the name/value pair to the HTTP request's Cookies collection
314
+ /// - RequestBody: Used by AddBody() (not recommended to use directly)
315
+ /// </summary>
316
+ /// <param name="name">Name of the parameter</param>
317
+ /// <param name="value">Value of the parameter</param>
318
+ /// <param name="contentType">Content-Type of the parameter</param>
319
+ /// <param name="type">The type of parameter to add</param>
320
+ /// <returns>This request</returns>
321
+ IRestRequest AddOrUpdateParameter ( string name , object value , string contentType , ParameterType type ) ;
322
+
279
323
/// <summary>
280
324
/// Shortcut to AddParameter(name, value, HttpHeader) overload
281
325
/// </summary>
0 commit comments