Skip to content

Commit

Permalink
MAGETWO-33629: creation of m2-sample-webapi-client
Browse files Browse the repository at this point in the history
- MAGETWO-35113: Implemantation
  • Loading branch information
Maksym Aposov committed Apr 6, 2015
1 parent 1f64984 commit a8924c7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions sample-module-webapi-client/view/frontend/web/js/web-api-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,33 @@ define([
});
params.searchCriteria.filter_groups.push({"filters": filters});
});
/*
Send REST api request. URL defined in the layout configuration(http://magento_root/rest/default/V1/products)
Request params looks like:
{
"searchCriteria":{
"filter_groups":[
{
"filters":[
{
"field":"sku",
"value":"simple",
"condition_type":"eq"
},
{
"field":"name",
"value":"product",
"condition_type":"eq"
}
]
}
],
"current_page":1,
"page_size":10
}
}
This request does not require authentication
*/
$.ajax({
url: self.options.url,
dataType: 'json',
Expand Down

0 comments on commit a8924c7

Please sign in to comment.