Example microservice to show airSpring Software create and return a customized PDF document (via POST). Or, pass and retrieve data (via GET).
airSpring is a visual design tool that lets you create variable documents (reports, brochures, correspondence, etc), manipulate data or mapreduce, or interactive applications and publish with a web service end point.
1. Clone this repo:
git clone https://github.com/airspringsoftware/tryit.git demo
cd demo
2. Make it your own:
rm -rf .git && git init && npm init
ℹ️ This re-initializes the repo and sets up your NPM project.
3. Install the dependencies:
npm install
You're done installing!
4. Curl Example:
curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" "https://tryit.airspringsoftware.com/marketing/api/overview.json?company=your_company_name&email=your_email_address&address=your_company_address&phone=your_phone_number"
Replace company and email in the preceeding curl example
5. Node tryit.js example:
var options = { method: 'POST',
url: 'https://tryit.airspringsoftware.com/marketing/api/overview.json',
headers:
{ 'cache-control': 'no-cache',
'content-type': 'application/json' },
body:
{ company: 'airSpring Software',
email: 'sales@airspringsoftware.com',
address: '2365 Harrodsburg Rd 2365 Harrodsburg Rd, Lexington, KY 40504',
phone: '(859) 309-6347' },
json: true };
Replace company and email in the body portion of the request
6. Run Node example:
node tryit.js
MIT