FubarDevelopment/restsharp.portable

GetOrPost parameters added to the URL query for a PUT request

Opened this issue · 4 comments

Get Or Post parameters are added as x-www-form-urlencoded for a POST request or in the URL query for a GET request however for a PUT request they are added using both methods. The x-www-form-urlencoded check is != GET and the query string check is != POST.

This appears to be:

https://github.com/VQComms/restsharp.portable/blob/master/src/FubarCoder.RestSharp.Portable.HttpClient/RestClientExtensions.cs#L88 = != GET add params to body

var queryParams = effectiveMethod != Method.POST
!= POST add param to querystring

As @tcorrin says, both should be != GET

Are you sure that this should be != GET? This condition determines the parameters to be added to the query string and the != POST ensures that GetOrPost parameters are added to the query string for all non-POST requests.

Yes, this causes huge issues when I attempt to send a file through a put.