title: LoopJ AndroidAsyncHttp Server Response after POST Android
body: <p>I am using LoopJ AndroidAsyncHttp to get/post data from/to my server. I know that when I call the .get method, the JSON response is stored in the s string as shown below:</p>
  
  <pre><code>    client = new AsyncHttpClient();
      client.get("https://example.com/generateToken.php", new TextHttpResponseHandler() {
          @Override
          public void onFailure(int i, Header[] headers, String s, Throwable throwable) {
  
          }
  
          @Override
          public void onSuccess(int i, Header[] headers, String s) {}
  </code></pre>
  
  <p>If, however, I am posting to the server, how do I get my server's response? I used the template here for posting:
  <a href="http://loopj.com/android-async-http/doc/com/loopj/android/http/RequestParams.html" rel="nofollow">http://loopj.com/android-async-http/doc/com/loopj/android/http/RequestParams.html</a></p>
  
  <p>Specifically my code looks something like this:</p>
  
  <pre><code>    params = new RequestParams();
  
      params.put("first_name", firstName);
      params.put("last_name", lastName);
     client = new AsyncHttpClient();
      client.post("xxx.com/createCustomer.php", params, responseHandler);
  </code></pre>
  
  <p>My server takes these inputs and returns a token. How do I retrieve this token? Do I have to call the .get method as before immediately after the .post code above? Or is it automatically echoed somehow? 
  Thanks</p>