xploite-module

connect to any file and fetch data

Usage no npm install needed!

<script type="module">
  import xploiteModule from 'https://cdn.skypack.dev/xploite-module';
</script>

README

Exploite-module

What to know

$ npm install exploite-module
$ npm install exploite-module --save

Note

Please ignore this is my testing module Note : please iglore this npm module is of no use i am just testing it.

Get the Method , uri, formdata.

run the following code its just a test parse in data and console the feed.get your response

const log = require('./index');

let form =  document.getElementById('form');
//or you can use query selector...
let form =  document.querySelector('#form');
//any can do

//add event listener
form.addEventListener('submit',login,true);
function login(event){
    event.preventDefault();
    let formData = new FormData(this);
    log.connect(method,url,formData)
    .then(response=>{console.log(response)})
    .catch(error=>{console.log(error)});
}

Do not forget to link your file with the following files


$ npm i traceur
$ npm i es6-module-loader

<script src="node_modules/traceur/bin/traceur.js"></script>
<script src="node_modules/es6-module-loader/dist/es6-module-loader-dev.js"></script>

Using promise

code Function
xploite.login() Takes in the method,url and the params.
xploite.update() update spacific user data with a given id as the param