@@ -70,6 +70,10 @@ public RestRequest(string resource, Method method) : this(resource, method, Data
70
70
{
71
71
}
72
72
73
+ public RestRequest ( string resource , DataFormat dataFormat ) : this ( resource , Method . GET , dataFormat )
74
+ {
75
+ }
76
+
73
77
public RestRequest ( string resource ) : this ( resource , Method . GET , DataFormat . Xml )
74
78
{
75
79
}
@@ -341,7 +345,6 @@ public IRestRequest AddJsonBody(object obj)
341
345
public IRestRequest AddXmlBody ( object obj ) => AddXmlBody ( obj , "" ) ;
342
346
343
347
/// <summary>
344
- /// Serializes obj to format specified by RequestFormat, but passes xmlNamespace if using the default XmlSerializer
345
348
/// Serializes obj to XML format and passes xmlNamespace then adds it to the request body.
346
349
/// </summary>
347
350
/// <param name="obj">The object to serialize</param>
@@ -654,6 +657,7 @@ public IRestRequest AddDecompressionMethod(DecompressionMethods decompressionMet
654
657
/// Used by the default deserializers to determine where to start deserializing from.
655
658
/// Can be used to skip container or root elements that do not have corresponding deserialzation targets.
656
659
/// </summary>
660
+ [ Obsolete ( "Add custom content handler instead. This property will be removed." ) ]
657
661
public string RootElement { get ; set ; }
658
662
659
663
/// <summary>
@@ -664,12 +668,14 @@ public IRestRequest AddDecompressionMethod(DecompressionMethods decompressionMet
664
668
/// <summary>
665
669
/// Used by the default deserializers to explicitly set which date format string to use when parsing dates.
666
670
/// </summary>
671
+ [ Obsolete ( "Add custom content handler instead. This property will be removed." ) ]
667
672
public string DateFormat { get ; set ; }
668
673
669
674
/// <summary>
670
675
/// Used by XmlDeserializer. If not specified, XmlDeserializer will flatten response by removing namespaces from
671
676
/// element names.
672
677
/// </summary>
678
+ [ Obsolete ( "Add custom content handler instead. This property will be removed." ) ]
673
679
public string XmlNamespace { get ; set ; }
674
680
675
681
/// <summary>
0 commit comments