Method post documentation
Creates a POST XHR through bbn.fn.ajax then launches bbn.fn.callback with the result.
Example
```javascript
bbn.fn.post('logout').then(() => {
document.location.reload();
});
// With data
bbn.fn.post('login', {user: 'tn', pass: 'xxx'}).then((d) => {
if (d && d.success) {
alert('Welcome!');
}
});
// With the callback as argument
bbn.fn.post('login', {user: 'tn', pass: 'xxx'}, (d) => {
if (d && d.success) {
alert('Welcome!');
}
}, (err) => {
bbn.fn.log(err);
mySpecialErrorFunction(err);
});
```
Creates a POST XHR through bbn.fn.ajax then launches bbn.fn.callback with the result. - URL is the only mandatory argument (see treatAjaxArguments for the arguments).
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2024
BBN Solutions