Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help!! #26

Closed
Ice-Storm opened this issue Apr 25, 2016 · 2 comments
Closed

Help!! #26

Ice-Storm opened this issue Apr 25, 2016 · 2 comments
Labels

Comments

@Ice-Storm
Copy link

How to change this code to "fdaciuk/ajax" ? Help!!
$.ajax({ url: url, contentType: false, data: FormObj, processData: false, type: 'POST', cache: false, success: function(){ .... }, error: function(){ ..... } });

@fdaciuk
Copy link
Owner

fdaciuk commented Apr 25, 2016

Hi @Ice-Storm! Are you using jQuery? Just do it:

var request = ajax({
  headers: { 'content-type': null }
})

request.post(url, FormObj)
  .then(function (data) {
    // success
    console.log(data)
  })
  .catch(function (err) {
    // error
    console.log(err)
  })

@Ice-Storm
Copy link
Author

Thank you! Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants