Guest User

Untitled

a guest
Oct 24th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. function getPrices(articles) {
  2. return $http.get('http://someurl/api/prices/getprices', { params: { articles: articles } }).then(function (res) {
  3. // do something with prices
  4. }, function (err) {
  5. // handle error
  6. });
  7. }
  8.  
  9. var oneArticle = {
  10. code: 'someCode',
  11. quantity: 1,
  12. stockUnit: 'piece'
  13. }
  14.  
  15. [VersionedRoute("getprices")]
  16. [HttpGet]
  17. public IHttpActionResult GetPrices([FromUri]List<Article> articles) {
  18. // do something with input
  19. }
  20.  
  21. public class Article {
  22. public string Code {get;set;}
  23. public int Quantity {get;set;}
  24. public string StockUnit {get;set;}
  25. }
Add Comment
Please, Sign In to add comment