FubarDevelopment / restsharp.portable

Some kind of a RestSharp port to PCL
BSD 2-Clause "Simplified" License
96 stars 33 forks source link

GetOrPost parameters added to the URL query for a PUT request #98

Open tcorrin opened 7 years ago

tcorrin commented 7 years ago

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.

jchannon commented 7 years ago

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

https://github.com/FubarDevelopment/restsharp.portable/blob/6811f9290f83d243a1cbc976843e2ba473015fa1/src/FubarCoder.RestSharp.Portable.Core/RestClientExtensions.cs#L163 != POST add param to querystring

As @tcorrin says, both should be != GET

fubar-coder commented 7 years ago

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.

jchannon commented 7 years ago

It should be != POST && != PUT I think

On 22 June 2017 at 16:42, Mark Junker notifications@github.com wrote:

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

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FubarDevelopment/restsharp.portable/issues/98#issuecomment-310419523, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGapsFmr4gusR0Mdwx78mLszl3fGpKeks5sGot_gaJpZM4OBGtk .

HappyTreesDev commented 7 years ago

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