Skip to content

Instantly share code, notes, and snippets.

View pmdownie's full-sized avatar

Patrick Downie pmdownie

View GitHub Profile
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!!');
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>IKEA Soap</title>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
function soap() {
axios.post('/ikea/fetch', {id: CUSTOMER_ID}).then(response => console.log(response))
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>IKEA Soap</title>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
function soap() {
let sr =
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="ikea.cusmgmt.remote.ws">' +