title: Android Retrofit | Post custom object (send json to server)
body: <p>I was wondering how could I go about sending a custom object to my API using retrofit, something like this:</p>
  
  <pre><code>@POST(URL_ORDERS)
  public void newOrder(Order order, Callback&lt;Boolean&gt; success);
  </code></pre>
  
  <p>Here's how I'd parse it on my server</p>
  
  <pre><code>public function store()
      {
      if(Auth::check()){
          $order = Input::get();
          $table = $order-&gt;table;
          $items = $order-&gt;items;
  
          if(!$table-&gt;taken){
              $table-&gt;taken = true;
  
              $order-&gt;push();
              $table-&gt;push();
  
              return true;
          }
      }
  
      return false;
  }
  </code></pre>
  
  <p>For some reason I'm getting</p>
  
  <pre><code>06-04 20:45:59.275    6085-6306/com.tesis.restapp.restapp W/dalvikvm﹕ threadid=11: thread exiting with uncaught exception (group=0x40aae210)
  06-04 20:45:59.285    6085-6306/com.tesis.restapp.restapp E/AndroidRuntime﹕ FATAL EXCEPTION: Retrofit-Idle
      java.lang.IllegalArgumentException: RestAppApiInterface.newOrder: No Retrofit annotation found. (parameter #1)
              at retrofit.RestMethodInfo.methodError(RestMethodInfo.java:120)
              at retrofit.RestMethodInfo.parameterError(RestMethodInfo.java:124)
              at retrofit.RestMethodInfo.parseParameters(RestMethodInfo.java:443)
              at retrofit.RestMethodInfo.init(RestMethodInfo.java:131)
  </code></pre>
  
  <p>I guess what I want it do to is to somehow transform my object into a json and send it to my server. Am I approaching this the right way?</p>