You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the type of RestRequest.Method property is RestSharp.Method. Before making the call, RestSharp converts the enum value to a HttpMethod instance. The enum is not extendable, so it is impossible to use any other method that is not included to the enum. Which leads to issues like #1048 and #2124. Whilst the first issue was obvious to implement, adding more and more enum values for not commonly used method possesses a challenge for maintainability.
It could be a good idea to allow using HttpMethod directly, but there's another challenge of backwards compatibility. Also, RestSharp provides enum values for methods like PATCH (n/a in .NET Framework) and MERGE, COPY and SEARCH, which aren't available in HttpMethod as constants.
I'd be happy to hear any design suggestions that would allow using any custom method without changing RestSharp code.
The text was updated successfully, but these errors were encountered:
Currently, the type of
RestRequest.Method
property isRestSharp.Method
. Before making the call, RestSharp converts the enum value to aHttpMethod
instance. The enum is not extendable, so it is impossible to use any other method that is not included to the enum. Which leads to issues like #1048 and #2124. Whilst the first issue was obvious to implement, adding more and more enum values for not commonly used method possesses a challenge for maintainability.It could be a good idea to allow using
HttpMethod
directly, but there's another challenge of backwards compatibility. Also, RestSharp provides enum values for methods likePATCH
(n/a in .NET Framework) andMERGE
,COPY
andSEARCH
, which aren't available inHttpMethod
as constants.I'd be happy to hear any design suggestions that would allow using any custom method without changing RestSharp code.
The text was updated successfully, but these errors were encountered: