title: Python Bottle API No Json Response while accessing using external API
body: <p>I created an api for openerp using bottle and works fine.</p>
  
  <p>Whenever i access using browser </p>
  
  <p>for example : <a href="http://example.com/api/user_name=uname&amp;password=pwd" rel="nofollow">http://example.com/api/user_name=uname&amp;password=pwd</a></p>
  
  <p>it returns json value and also responds while accessing same api using python</p>
  
  <p>But the problem is while i access it from external api using php it doesn't response or returns json data.</p>
  
  <p>here is my wgsi code</p>
  
  <pre><code>    from bottle import Bottle,get,post,run,request,error,route,template,validate,debug,response
      import json
      import os
      import sys
      import bottle
      @route ('/user_name=:user_name&amp;password=:password', method='GET')
      @route ('/user_name=:user_name&amp;password=:password', method='POST')
      def login_validate(user_name,password):
          import xmlrpclib
          print "test"
          dbname = 'more'
          sock_common = xmlrpclib.ServerProxy ('http://localhost:8069/xmlrpc/common')
          uid = sock_common.login(dbname, user_name, password)
          if uid:
              sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')
              adv_fields = ['name']
              adv_args=[('user_id','=',uid)]
              adv_id = sock.execute(dbname, uid, password, 'res.partner', 'search', adv_args) 
              if adv_id:
                  res = sock.execute(dbname, uid, password, 'res.partner', 'read',adv_id, adv_fields) [0]
                  print res,type(res)
                  return json.dumps({'Sucesss':res['name']})
              else:
                  return json.dumps({'Error':'User Found but not a partner'})
          else:
              return json.dumps({'Failure':'Invalid User Name or Password'})
      application = bottle.default_app()
  </code></pre>