Package org.opennms.protocols.xml.config
Class Content
- java.lang.Object
-
- org.opennms.protocols.xml.config.Content
-
- All Implemented Interfaces:
Cloneable
public class Content extends Object implements Cloneable
The Class Content.Post a Form:
<content type='application/x-www-form-urlencoded'><![CDATA[ <form-fields> <form-field name='firstName'>Alejandro</form-field> <form-field name='lastName'>Galue</form-field> </form-fields> ]]></content>
Post a JSON Object:
<content type='application/json'><![CDATA[ { person: { firstName: 'Alejandro', lastName: 'Galue' } } ]]></content>
Post a XML:
<content type='application/xml'><![CDATA[ <person> <firstName>Alejandro</firstName> <lastName>Galue</lastName> </person> ]]></content>
- Author:
- Alejandro Galue
-
-
Method Detail
-
getType
public String getType()
Gets the type.- Returns:
- the type
-
setType
public void setType(String type)
Sets the type.- Parameters:
type
- the new type
-
getData
public String getData()
Gets the data.- Returns:
- the data
-
setData
public void setData(String data)
Sets the data.- Parameters:
data
- the new data
-
-