Class 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
    • Constructor Detail

      • Content

        public Content()
        Instantiates a new content.
      • Content

        public Content​(String type,
                       String data)
        Instantiates a new content.
        Parameters:
        type - the type
        data - the data
      • Content

        public Content​(Content copy)
    • 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