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
That will fail with a 500 response from harvest due to the way that RestSharpFactory.cs constructs the RestClient, more specifically the ParameterType of access_token. Since access_token is set to be GetOrPost, this will result in the whole request being thrown away and the RequestBody will instead just contain access_token=<token>
If you have GetOrPost parameters as well, they will overwrite the RequestBody – RestSharp will not combine them but it will instead throw the RequestBody parameter away.
We can test a solution to this this using reflection by setting ParameterType to QueryString:
If you issue a CreatePayment using the following method:
That will work normally. However, if you do:
That will fail with a 500 response from harvest due to the way that RestSharpFactory.cs constructs the RestClient, more specifically the ParameterType of access_token. Since access_token is set to be GetOrPost, this will result in the whole request being thrown away and the RequestBody will instead just contain
access_token=<token>
According to the RestSharp documentation:
We can test a solution to this this using reflection by setting ParameterType to QueryString:
And now it works :)
The text was updated successfully, but these errors were encountered: