如何在角度js工廠消費webApi?角度js工廠消費asp.net 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結果:
GET/API /店/保修/得/美國/ EN/ABC/19 /產品A/ABC-123 HTTP/1.1