Skip to content

Comments

Update API to support delivery confirmation API#1

Open
programWhiz wants to merge 1 commit intodsusco:masterfrom
programWhiz:master
Open

Update API to support delivery confirmation API#1
programWhiz wants to merge 1 commit intodsusco:masterfrom
programWhiz:master

Conversation

@programWhiz
Copy link

No description provided.

}),
var xml = templates[req](data);
// Remove whitespace between XML elements
xml = xml.replace(/>\s*</mg, '><');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least in my testing, this was required to get it to work right.

request({
url: url,
method: 'GET',
qs: { API: api, XML: xml }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also wouldn't work without URI encoding all the stuff, so it seemed cleaner to use the builtin request functionality rather than a template.

@dsusco
Copy link
Owner

dsusco commented Sep 13, 2018

Thanks @programWhiz, could you add some tests for it?

Sorry for not getting back to you sooner, I don't remember ever getting a notification for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants