Copy link to clipboard
Copied
Hi
What is the best way to remove http header from reply
if (conn.open("192.168.5.26:8000", "BINARY")) {
var request =
"GET /article/ HTTP/1.0\n" +
"Host: 192.168.5.26\n" +
"User-Agent: InDesign ExtendScript\n" +
"Accept: text/xml,text/*,*/*\n" +
"Accept-Encoding:\n" +
"Connection: keep-alive\n" +
"Accept-Language: *\n" +
"Accept-Charset: utf-8\n\n";
conn.write(request);
reply = conn.read(999999);
alert(reply);
conn.close();
} else {
alert('Problem connecting...');
}
Thanks
Copy link to clipboard
Copied
I use
var res = response.split('\r\n\r\n');
alert(res[1]);
}
but i don't know if it is the best solution