Skip to content

Instantly share code, notes, and snippets.

@pmdownie
Last active May 29, 2018 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmdownie/653d7ca17327438bf929fcdb71f1e5de to your computer and use it in GitHub Desktop.
Save pmdownie/653d7ca17327438bf929fcdb71f1e5de to your computer and use it in GitHub Desktop.
SOAP post
const post = () => (req, res) => {
const config = {
headers: { 'Content-Type': 'text/xml; charset=utf-8' }
};
const updateBody = formatUpdate(req.body.details, req.body.payload);
axios
.post('https://testing.cs.quantmarketing.com/ikbe-onlinesoapapi/Service.asmx', updateBody, config)
.then(response => {
console.log('Posted!!');
console.log(response.data);
})
.catch(error => {
console.log('Error posting', error);
res.status(404).send('User not found');
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment