How can i get http body??

Frank Liou fk26541598fk at
Thu Jul 10 05:19:33 CEST 2014

how can i catch the "body" when  i was post ??

i want to catch body to my database and encode to base64

def hello(username):
        if request.method=='POST':
            return username

def post_insert(username):
    conn = engine.connect()
    encoded = base64.b64encode(username.encode('utf-8'))
    puresql = sqla.text("INSERT INTO friends(name) VALUES(:encoded)")
    conn.execute(puresql,encoded = encoded)

More information about the Python-list mailing list