Asp.net web api 如何通过postman将自定义对象数组作为多种形式的数据内容发送到asp.net web api?

Asp.net web api 如何通过postman将自定义对象数组作为多种形式的数据内容发送到asp.net web api?,asp.net-web-api,postman,multipartform-data,Asp.net Web Api,Postman,Multipartform Data,如何通过Postman将自定义对象数组正确发送到asp.net web api?我所做的是: 自定义类: public class SystemConsumerConfiguration { public int SystemId { get; } public Uri CallbackUrl { get; } public SystemConsumerConfiguration() { }

如何通过Postman将自定义对象数组正确发送到asp.net web api?我所做的是:

自定义类:

public class SystemConsumerConfiguration
    {
        public int SystemId { get; }
        public Uri CallbackUrl { get; }

        public SystemConsumerConfiguration()
        {
        }

        public SystemConsumerConfiguration(int systemId, Uri callbackUrl)
        {
            SystemId = systemId;
            CallbackUrl = callbackUrl;
        }
   }
public class PostDigitalPostSubscriptionConfiguration
    {
        public IReadOnlyList<SystemConsumerConfiguration> SystemsModel { get; set; }

        public IFormFile Certificate { get; set; }


        public PostDigitalPostSubscriptionConfiguration()
        {
        }
    }
在REST API中查看模型:

public class SystemConsumerConfiguration
    {
        public int SystemId { get; }
        public Uri CallbackUrl { get; }

        public SystemConsumerConfiguration()
        {
        }

        public SystemConsumerConfiguration(int systemId, Uri callbackUrl)
        {
            SystemId = systemId;
            CallbackUrl = callbackUrl;
        }
   }
public class PostDigitalPostSubscriptionConfiguration
    {
        public IReadOnlyList<SystemConsumerConfiguration> SystemsModel { get; set; }

        public IFormFile Certificate { get; set; }


        public PostDigitalPostSubscriptionConfiguration()
        {
        }
    }
公共类PostDigitalPostSubscriptionConfiguration
{
公共IReadOnlyList系统模型{get;set;}
公共文件证书{get;set;}
公共PostDigitalPostSubscriptionConfiguration()
{
}
}
现在,我向邮递员提出了一个请求

问题是,该模型与默认值绑定:

忘记在
系统消费者配置中设置公共设置器

应该是这样的:

public class SystemConsumerConfiguration
    {
        public int SystemId { get; set; }
        public Uri CallbackUrl { get; set; }

        public SystemConsumerConfiguration()
        {
        }

        public SystemConsumerConfiguration(int systemId, Uri callbackUrl)
        {
            SystemId = systemId;
            CallbackUrl = callbackUrl;
        }
   }
答复如下: