如何在 Angular js 工厂中使用 webApi?
WebAPI
public class WarrantyController: ApiController {
public WarrantyViewModel Get(string c, string l, string s, string cs, string productcode, string ordercode, string overrides) {
var response = Query(new WarrantyQuery(UserContext.CreateContext(c, l, s, cs), productcode, ordercode, overrides));
return response.Data;
}
}
这将返回 json 结果:
获取 /api/shop/warranty/get/us/en/abc/19/productA/abc-123 HTTP/1.1