- HTTPS supported
- Works form CS4 to CC 2024 (ExtendScript based library)
- Based on VBScript/ServerXMLHTTP (Win) AppleScript/curl (Mac) relies on app.doScript()
See examples/connect.jsx
var request = { url:"String", command:"String", // defaults to "" port:443, // defaults to "" method:"GET|POST", // defaults to GET headers:[{name:"String", value:"String"}], // defaults to [] body:"" // defaults to "" } var response = restix.fetch(request); if (response.error) { $.writeln("Response Error: " + response.error); $.writeln("Response errorMsg: " + response.errorMsg); } $.writeln("Response HTTP Status: " + response.httpStatus); $.writeln("Response Body: " + response.body); A working Example
request = { url:"https://jsonplaceholder.typicode.com", command:"posts/1", } var response = restix.fetch(request); $.writeln("Response Body: " + response.body); See press2id for a InDesign to Wordpress connection via REST.