Can RestSharp send binary data without using a multipart content type?

后端 未结 6 2220
闹比i
闹比i 2020-12-14 12:48

I have been using AddParameter to include XML bodies in my HTTP requests:

request.AddParameter(contentType, body, ParameterType.RequestBody);
         


        
6条回答
  •  -上瘾入骨i
    2020-12-14 13:16

    There have been some modifications made in the latest version that allow a single file to be used without creating a multipart form request. Here is a gist that shows and example:

    https://gist.github.com/hallem/5faaa6bebde50641e928

提交回复
热议问题