title: How to get response from restlet ClientResource?
body: <p>This may be easy one, but I am confused.</p>
  
  <p>I am trying to do HTTP POST on a server using Android Restlet, and read the reply returned from the server.</p>
  
  <p>I created form using:</p>
  
  <pre><code>Form form = new Form
  form.add("msg" ,"This is my message");
  </code></pre>
  
  <p>Now, I have clientResource as follows:</p>
  
  <pre><code>ClientResource clientResource = new ClientResource("www.example.com/my-http-post-url/");
  </code></pre>
  
  <p>Now, I am doing HTTP Post as:</p>
  
  <pre><code>Representation response=null;
  
  try{
  
   response= clientResource.post(form.getWebRepresentation(null));
   System.out.println("Got response !! , response : " + response.getText());
   System.out.println( "Got Context: " + clientResource.getContext() );
   System.out.println( "Got Response: " + clientResource.getResponse());
   System.out.println( "Got Resonse Attribute : " + clientResource.getResponseAttributes() );
   System.out.println( "Got Resonse Entity: " + clientResource.getResponseEntity() );
  
  }catch(Exception e){
  
  e.printStackTrace();
  
  }
  </code></pre>
  
  <p>I found out that the code is going inside try, but its printing :</p>
  
  <pre><code>I/org.restlet(  493): Starting the default HTTP client
  I/System.out(  493): Got response !! , response : null
  I/System.out(  493): Got Context: null
  I/System.out(  493): Got Response: HTTP/1.1 - OK (200) - OK
  I/System.out(  493): Got Resonse Attribute : {org.restlet.http.headers=[(Date,Sun, 22 Jul 2012 22:14:03 GMT), (Server,WSGIServer/0.1 Python/2.7.1+), (Vary,Authorization), (Content-Type,application/json; charset=utf-8)]}
  I/System.out(  493): Got Resonse Entity: [application/json,UTF-8]
  </code></pre>
  
  <p>I tried sniffing the data, to see if the server is replying or not, I am confident that server is sending the response content.</p>
  
  <p>Can anyone tell me, how can I find out the response content send by the server?</p>