Purpose | The post statement is used to send a Superx++ object or XML node (with any contained nodes) to a URL via the POST method of the HTTP protocol. | |||||
Superx++ Version | The post statement was introduced to the Superx++ language in beta 0.2.2 in standard Superx++. The shortx version is introduced in beta 0.2.3. | |||||
Format |
post({Superx++ object or XML node}, {URL});
{Superx++ object or XML node} |
the name of the Superx++ object or the XML node to be posted |
{URL} |
the URL to which the Superx++ object or the XML node would be POSTed |
|
|
Example #1 |
node MyXML { <Emps> <Emp var_int_Age="30"> <EmpName>Sandr.ie</EmpName> <Age>25</Age> <Addresses> <Address> <Street>The Nice Road</Street> <City>Niceville</City> <Duration>10</Duration> </Address> <Address> <Street>56 Hope Road</Street> <City>Kingston</City> <Duration>20</Duration> </Address> </Addresses> </Emp> <Emp var_int_Age="77"> <EmpName>Dedan</EmpName> <Age>34</Age> <Address> <Street>1 Kijabe Street</Street> <City>Some Place</City> <Duration>30</Duration> </Address> </Emp> </Emps> }; post("MyXML", "http://MyServer/MyDir/MyPage.asp"); creates a node called MyXML and POSTs it to the URL. |