问题描述
尝试使用c#httpClinet发布产品数组进行购物。但是收到400个错误的请求。还尝试发布product = new对象(如商品)数组,但也获得了400条代码。
var arrayOfProducts = new
{
products = new[]
{
new
{
title = "qqwqw",description = "test",product_type = "Game",vendor = "test"
},new
{
title = "1233eewq",vendor = "test"
}
}
};
var resp = await http.PostAsync($"{_shopify.Path}/products.json",new StringContent(
JsonSerializer.Serialize(arrayOfProducts),Encoding.UTF8,"application/json"),stoppingToken);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)