grefel / restix

REST InDesign Exchange or connect InDesign to the secure Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

REST InDesign Exchange or connect InDesign to the secure Web

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%