cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Please note that Remote Expert Mobile announced end-of-life and support will end on February 28, 2022.
514
Views
1
Helpful
1
Replies
Highlighted
Beginner

How to use http putxml for configuration?

Guys,

I'm a new beginner on API for video system. Trying to configure codec through our own application and see HTTP can push the whole configuration with xml instead of sending different commands through SSH. But the doc says using http://ip/putxml and then gives example about XML file. But dumb question here: how do you invoke that XML with http://ip/putxml?

Thanks!

Lou

1 REPLY 1
Highlighted
Beginner

I used formputxml with javascript

var xml = new XMLHttpRequest();

            var url = "http://ip/formputxml?xmldoc="

            xml.open("POST", url, false);

            xml.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

            var xmlcommand = '<Command><Camera><PositionSet command="True"><CameraId>1</CameraId><Pan>'+pan+'</Pan><Tilt>'+tilt+'</Tilt><Zoom>'+zoom+'</Zoom></PositionSet></Camera></Command>';

            xml.send(xmlcommand);