Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API to support delivery confirmation API #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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