Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

post xml with axios nodejs

var xmlBodyStr = `<?xml version="1.0" encoding="UTF-8"?>
       <req:KnownTrackingRequest xmlns:req="http://www.example.com" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                xsi:schemaLocation="http://www.example.com
                TrackingRequestKnown.xsd">
         <Request>
           <ServiceHeader>
              <MessageTime>2002-06-25T11:28:56-08:00</MessageTime>
              <MessageReference>1234567890123456789012345678</MessageReference>
              <SiteID>SiteID</SiteID>
              <Password>Password</Password>
           </ServiceHeader>
         </Request>
         <LanguageCode>en</LanguageCode>
         <AWBNumber>01234567890</AWBNumber>
         <LevelOfDetails>LAST_CHECK_POINT_ONLY</LevelOfDetails>`;

var config = {
     headers: {'Content-Type': 'text/xml'}
};

axios.post('https://POST_URL', xmlBodyStr, config); 
Comment

PREVIOUS NEXT
Code Example
Javascript :: angular bind style value 
Javascript :: angular http loader 
Javascript :: javascript decode a sting in base64 
Javascript :: deserialize json jquery 
Javascript :: how to limit characters in number input js 
Javascript :: embed video by javascript 
Javascript :: PayloadTooLargeError 
Javascript :: discord.js remove every role a user has 
Javascript :: set timeout 
Javascript :: Toggle checkbox checking in jquery 
Javascript :: copy to clipboard 
Javascript :: how to compare two time in moment js 
Javascript :: react native apk bundle 
Javascript :: get version from package.json 
Javascript :: javascript print 
Javascript :: substring 
Javascript :: javascript define global variable 
Javascript :: clear value input jquery 
Javascript :: javascript array size 
Javascript :: quasar apexchart 
Javascript :: How to fetch API data using POST and GET in PHP 
Javascript :: export data to excel using react js 
Javascript :: ternaire js 
Javascript :: how to make input field empty in javascript 
Javascript :: split 2 arrays javascript 
Javascript :: Disable click for specific elements javascript 
Javascript :: regex for comments javascript 
Javascript :: javascript anagram two strings 
Javascript :: javascript indexof with condition 
Javascript :: how can ic get the id of div jq 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =