Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. function sendRequest() {
  2. //var method = $('#method').val();
  3. var email = 'me@mymail.com';
  4. var pwd = 'mypwd01!';
  5.  
  6. $.ajax({
  7. crossDomain: true,
  8. type: 'post',
  9. url: serviceUrl,
  10. processData: false,
  11. dataType: 'jsonp',
  12. processData: false,
  13. contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
  14. data: {'grant_type': 'password', 'userName': email, 'Password': pwd},
  15. }).done(function (data) {
  16. $('#value1').text(data);
  17. }).error(function (jqXHR, textStatus, errorThrown) {
  18. $('#value1').text(jqXHR.responseText || textStatus);
  19. });
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement