Class Content

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class Content
    extends java.lang.Object
    implements java.lang.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 Summary

      Constructors 
      Constructor Description
      Content()
      Instantiates a new content.
      Content​(java.lang.String type, java.lang.String data)
      Instantiates a new content.
      Content​(Content copy)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Content clone()  
      java.lang.String getData()
      Gets the data.
      java.lang.String getType()
      Gets the type.
      void setData​(java.lang.String data)
      Sets the data.
      void setType​(java.lang.String type)
      Sets the type.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Content

        public Content()
        Instantiates a new content.
      • Content

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

        public Content​(Content copy)
    • Method Detail

      • getType

        public java.lang.String getType()
        Gets the type.
        Returns:
        the type
      • setType

        public void setType​(java.lang.String type)
        Sets the type.
        Parameters:
        type - the new type
      • getData

        public java.lang.String getData()
        Gets the data.
        Returns:
        the data
      • setData

        public void setData​(java.lang.String data)
        Sets the data.
        Parameters:
        data - the new data
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public Content clone()
        Overrides:
        clone in class java.lang.Object