@paul53 Mit deiner Idee und dem Attribute "form" bekomme ich zwar keinen Timeout mehr, eine Sprachausgabe erfolgt aber nicht. Timeout Variable habe ich wieder rausgenommen, da 2000ms mehr als ausreichend sein sollte.
httpPost('http://192.168.178.51:8765', { form: {sayit: 'Sprachausgabe' }}, (error, response) => {
if (!error) {
console.log(response.statusCode);
console.log(response.data);
console.log(response.headers);
} else {
console.error(error);
}
});
javascript.0 12:09:24.356 info script.js.common.Sayit: 200
javascript.0 12:09:24.356 info script.js.common.Sayit: <html><head><head><body><h1>Hello, World</h1></body>Header<br/>content-length : 29 remote-addr : 192.168.178.252 http-client-ip : 192.168.178.252 host : 192.168.178.51:8765 content-type : application/json connection : keep-alive accept-encoding : gzip, compress, deflate, br accept : application/json, text/plain, */* user-agent : Mozilla/5.0 (X11; Linux i686; rv:109.0) Gecko/20100101 Firefox/121.0 <br/>----<br/>method = POST<br/>uri = /<br/>Params<br/>NanoHttpd.QUERY_STRING : null<br/></html>
javascript.0 12:09:24.356 info script.js.common.Sayit: Object [AxiosHeaders] { 'content-type': 'text/html', date: 'Sun, 23 Jun 2024 10:09:24 GMT', connection: 'keep-alive', 'content-length': '496' }