Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.06 KB

readme.md

File metadata and controls

41 lines (34 loc) · 1.06 KB

Connect InDesign to the web

  • HTTPS supported
  • Works form CS4 to CC 2023 (ExtendScript based library)
  • Based on VBScript/ServerXMLHTTP (Win) AppleScript/curl (Mac) relies on app.doScript()

Getting started

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);

Fully working example with Wordpress

See press2id for a InDesign to Wordpress connection via REST.