I’m not able to change the charset encoding to anything diffrant than UTF-8, my application supposed to send the data to the server with charset=windows-1256, as all backend services is using this charset
I trying by setting the contentType to application/x-www-form-urlencoded;charset=windows-1256 but F7 is always seding with charset=UTF-8
I also tried with the method beforeSend, but also I got the same result
how I can change the POST data charset?
example as below:
app.request({
url: 'aaaa',
method: 'POST',
contentType: 'application/x-www-form-urlencoded;charset=windows-1256',
data: {
reqCode:'send','clientType':'JSON'
},
beforeSend: function (xhr) {
console.log(xhr);
console.log('Before');
xhr.setRequestHeader( 'Content-type', 'application/x-www-form-urlencoded;charset=windows-1256');
console.log('After');
console.log(xhr);
},
success: function (data) {
let response = JSON.parse(data);
app.dialog.alert(response);
},
error: function (data) {
console.log("ERROR");
console.log(data);
app.dialog.alert("Error",response);
}
});