×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Dmitriy Lanets
Added: Jun 24, 2016 6:43 AM
Modified: Jun 24, 2016 8:00 AM
Views: 1983
Tags: no tags
  1. var jq = document.createElement('script');
  2.    jq.src = "http://code.jquery.com/jquery-latest.min.js";
  3.    document.getElementsByTagName('head')[0].appendChild(jq);
  4.    
  5.  
  6. $.ajax({
  7.  url: "/user/12",
  8.  method:"PUT",//PUT DELETE POST
  9.   headers: {
  10.            'X-CSRF-TOKEN': '7sCS0WvVFxvBhbzDl30TTZrDrQJ64LnoTfZLVqYV'
  11.        },
  12.  
  13.  data:{
  14.    name:'dima',
  15.    surname:'lanetz',
  16.    city_id:1,
  17.    phone:'8(953)678-65-32',
  18.    password:'dhvfhdj236236232gdfsd',
  19.    email:'dim2@lanetz.ru',
  20.    sex:'m',
  21.    date_birth:'1980-11-07'
  22.    
  23.    
  24.  }
  25.  
  26. }).done(function() {
  27.  
  28. });