src/targets/javascript/fetch/fixtures/application-form-encoded.js
const url = 'http://mockbin.com/har';
const options = {
method: 'POST',
headers: {'content-type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({foo: 'bar', hello: 'world'})
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}