daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Aug 21st, 2018 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(document).ready(function( $ ){
  2.     $('.wpcf7-form').on('submit', function(e){
  3.     e.preventDefault()
  4.     var email = $('#email').val();
  5.     var name = $('#nome').val();
  6.     var url = 'https://panel.kloudymail.com/api/subscriber/create/'
  7.     var userData = {
  8.         "KM_RECIPIENT": email,
  9.         "account_code": "95031C8E-3F59-4842-A7E7-272BA0D7054C",
  10.         "data": {
  11.             "INTERESTS": [
  12.                 "F1",
  13.                 "MotoGP"
  14.             ],
  15.             "GENDER": "Male",
  16.             "DATE": "2016-07-09",
  17.             "NAME": name
  18.         },
  19.         "notify": true,
  20.         "list_code": "73C926A0-E6FC-4A50-B127-C46C04FB7FF0"
  21.     };
  22.     $.ajax({
  23.         type: "POST",
  24.         beforeSend: function(request) {
  25.             request.setRequestHeader("Content-Type", "application/json");
  26.             request.setRequestHeader("charset", "UTF-8");
  27.             request.setRequestHeader("Authorization", "Bearer dea8d0908678147508e89ad7646092dcc6fe1e84");
  28.         },
  29.         /*headers: {
  30.         "Authorization": "Bearer ebc72eb71a41790c2377812732314e43fca8e9d5",
  31.         "Content-Type": "application/json",
  32.         "charset": "UTF-8"
  33.         }, */
  34.  
  35.         url: url,
  36.         data: userData,
  37.         processData: true,
  38.         success: function(data) {
  39.             alert('sended')
  40.         },
  41.         error: function(error){
  42.             alert('not sended')
  43.         }
  44.     });
  45. })
  46.  
  47. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top