首页 > 解决方案 > 将base64传递给json请求C#

问题描述

我在将 base64 传递到我的 json 调用时遇到问题

我在我的代码中将 baseImage 定义为一个字符串,但是,每当我在 SOAP UI 上运行我的服务时,它甚至都不会运行,因为我的调用中有 base64 参数。

以下是我得到的 在此处输入图像描述

这是我的课

 public class InsertPostwithImageRequest
    {
        //public string UserName { get; set; }
        //public string Password { get; set; }
        public string Title { get; set; }
        public string Content { get; set; }
        public string EncodedImage {get; set;}
      //  public string PostedAs { get; set; }
    }

任何帮助表示赞赏。

更新:我尝试传递一个 3 个字母的字符串,它工作正常,但是,当我传递 stringfied base64 时,它没有响应

标签: c#asp.net.netjsonrest

解决方案


推荐阅读