【发布时间】:2017-02-20 11:14:26
【问题描述】:
我正在使用 C# 在我的 asp.net mvc 应用程序中使用 Woocommerce rest api。 如何获取订单的发货跟踪信息。 我的代码是 -
string url = StoreUrl + "/wp-json/wc/v1/orders/"+ orderId + "/shipment-trackings";
var req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "GET";
req.ContentType = "application/json";
req.PreAuthenticate = true;
var resp = (HttpWebResponse)req.GetResponse();
但未找到响应返回 404。如何解决这个问题呢。 请尽快认识我。 谢谢...
【问题讨论】:
-
404 表示您的代码没有错,但您创建的网址不正确或不存在。
标签: c# asp.net api model-view-controller woocommerce