Javascript Code

Using the browser Fetch API and a CORS request:

const fetchData = async () => {
try {
const response = await fetch('https://maylancer.org/api/nuban/api.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
account_number: '12345678910',
bank_code: '421'
})
});
 
if (!response.ok) {
throw new Error('Request failed');
}
 
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
};
 
fetchData();