title: webapp2 - serving both website and android app
body: <p>I am using python+webapp2 for my backend code. The POST method looks like::</p>
  
  <pre><code>class SendOTP(BookSearchRequestHandler):
      def post(self):
  
          phone_no = self.request.get('phno').rstrip()
          uuid = self.request.get('uuid').rstrip()
          //some operations
  
          //construction of JSON
          tpl_values = {
          'books': book1_list,
          'query': search_query,
          'is_logged':is_logged,
          'is_ipsame':is_ipsame
           }
  
         self.render('serp/products.html', **tpl_values)
  </code></pre>
  
  <p>This works very well with my front-end html code. I can POST values and then render another page with contents of <code>tpl_values</code>. </p>
  
  <p>However, now I am developing android app. The android app expects to send and receive data in JSON format.  The code <code>self.request.get()</code> cannot read the values sent by POSTMAN POST.  I get 405 method not allowed, The method GET Not Allowed. Also <code>self.render</code> cannot be used to send data to android. </p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;405 Method Not Allowed&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h1&gt;405 Method Not Allowed&lt;/h1&gt;
    The method GET is not allowed for this resource.
          &lt;br /&gt;
          &lt;br /&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How can I modify the code so that it serves requests from both html and android , POSTMAN? 
  Thanks</p>