Description
Hi,
has already mention in this issue #1937
I create this issue to speak about technical solution I will PR.
Is your feature request related to a problem? Please describe.
Some API require an exact order of fields in POST multipart formdata.
I the actual behavior the file is always put in first.
Describe the solution you'd like
Make fields order parametable for each request.
To do that, I plan to add in RestRequest an array of 3 Enum value (like ParameterType.File
, ParameterType.Body
, ParameterType.Post
) which will define the order. (Maybe the enum already exist ? I don't really search for yet )
The default order will be the actual one [File, body, post] to not break existing code.
In the RequestContent.BuildContent
I will use this array to re-order call from line 46 to 53 (maybe will add headers in the list also, not sure yet)
Do you thinks this can be a good solution ? Or do you have better idea ?
Describe alternatives you've considered
No work around found