任何人都可以帮助发布shopify或者它可能是json的格式我没有syre我尝试过httpclient和restclient没有运气我的json数据看起来像 {" order":{" line_items":[{" variant_id":720123393," quantity":1}]}} 使用curl我并将数据作为txt文件它可以工作,但我似乎无法让它工作在.net我回来{"错误":{"顺序":& #34;必需参数缺失或无效"}}
var client = new RestClient(baseAddress);
client.Authenticator = new HttpBasicAuthenticator(userName, password);
// {"order": {"line_items": [{"variant_id": 720123393,"quantity": 1}]}}
string data = @"{""order"": {""line_items"": [{""variant_id"": 720123393,""quantity"": 1}]}}";
var request = new RestSharp.RestRequest("admin/orders.json", RestSharp.Method.POST) { RequestFormat = RestSharp.DataFormat.Json }
.AddBody(data);
var response = client.Execute(request);