Advertisement
Guest User

Untitled

a guest
May 8th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <script src="jquery-3.3.1.min.js"></script>
  2. <script>
  3. $('#layout2').click(function(){
  4. var form = new FormData();
  5. form.append("layoutId", "2");
  6. form.append("changeMode", "replace");
  7. form.append("displayGroupId", "2");
  8.  
  9. var settings = {
  10. "async": true,
  11. "crossDomain": true,
  12. "url": "http://192.168.0.131/api/displaygroup/2/action/changeLayout?envelope=1",
  13. "method": "POST",
  14. "headers": {
  15. "Authorization": "Bearer xxx",
  16. "Cache-Control": "no-cache",
  17. "Postman-Token": "xxx"
  18. },
  19. "processData": false,
  20. "contentType": false,
  21. "mimeType": "multipart/form-data",
  22. "data": form
  23. }
  24.  
  25. $.ajax(settings).done(function (response) {
  26. console.log(response);
  27. });
  28. });
  29. </script>
  30. </head>
  31. <body>
  32. <button id="layout2">Test</button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement