Closed mikevmil closed 7 years ago
You're url is broken when clicked, but it works when copy/pasted
@tyrsius Thanks for noticing! I've updated the link.
The body parameter needs to be named. Try using:
AddParameter(new Parameter { Name = "name", Type = ParameterType.RequestBody, Value = yourValue }
The next release contains some convenience functions for this situation.
Thanks!
When I use AddBody and AddFile in the same request, the request fails.
My stacktrace:
I debugged the call and it seems that there's no parameter set for the body when posting multipart data since MultipartFormDataContent.Add is called without a name.
It should be possible in the original RestSharp, considering someone else got it to work: #https://github.com/restsharp/RestSharp/issues/524#issuecomment-68075428 What @tyrsius is doing at attempt 1 is exactly what I want to happen.
Am I doing something wrong or is it a bug?