Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74291
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2014-07-09 20:19 -0700 |
| Message-ID | <4574254f-e813-4f16-bafb-cbd649496095@googlegroups.com> (permalink) |
| Subject | How can i get http body?? |
| From | Frank Liou <fk26541598fk@gmail.com> |
https://lh5.googleusercontent.com/-6t5tmr5T4Ys/U74FdF128oI/AAAAAAAABvo/bYyaHzsdw9Q/s1600/%E6%9C%AA%E5%91%BD%E5%90%8D.jpg
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':
post_insert(username)
return username
def post_insert(username):
init_db()
conn = engine.connect()
encoded = base64.b64encode(username.encode('utf-8'))
puresql = sqla.text("INSERT INTO friends(name) VALUES(:encoded)")
conn.execute(puresql,encoded = encoded)
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
How can i get http body?? Frank Liou <fk26541598fk@gmail.com> - 2014-07-09 20:19 -0700
Re: How can i get http body?? Roy Smith <roy@panix.com> - 2014-07-10 10:02 -0400
Re: How can i get http body?? Frank Liou <fk26541598fk@gmail.com> - 2014-07-10 18:20 -0700
csiph-web