cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1016
Views
1
Helpful
1
Replies

How to use http putxml for configuration?

hxmengmetro
Level 1
Level 1

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

miroslaw12
Level 1
Level 1

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);