Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1.  
  2. pass = {
  3. url : 'https://www.ica.se/handla/api/cart/v1/cart/current/item/2319103200000',
  4. contentType : '{quantity: {amount: 1, unit: "PCE"}}'
  5. };
  6. //
  7.  
  8. // quantity: {amount: 1, unit: "PCE"}
  9.  
  10.  
  11. $.ajax({
  12. url : pass.url,
  13. type : 'PUT',
  14. dataType : "json",
  15. 'x-application-customer-type' : 'B2C',
  16. 'x-application-full-response' : false,
  17. 'x-application-store-id' : 13026,
  18. data : JSON.stringify({quantity: {amount: 1, unit: "PCE"}}),
  19. contentType : 'application/json; charset=utf-8',
  20. timeout : 10000
  21. })
  22. .done((page) => {
  23. let parser = new DOMParser();
  24. let d = parser.parseFromString(page, "text/html");
  25. let items = [];
  26.  
  27. console.log(d);
  28. })
  29.  
  30. //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement