fixed WebClient contrib to properly send raw data in POST methods

This commit is contained in:
Mariano Reingart
2014-01-19 18:30:29 -03:00
parent 0e0ae1b5be
commit 56121a9c9d

View File

@@ -1,3 +1,4 @@
"""
Developed by Massimo Di Pierro
Released under the web2py license (LGPL)
@@ -105,9 +106,9 @@ class WebClient(object):
# assume everything is ok and make http request
error = None
try:
if isinstance(data,str):
if isinstance(data, str):
self.method = 'POST' if method=='auto' else method
if isinstance(data, dict):
elif isinstance(data, dict):
self.method = 'POST' if method=='auto' else method
# if there is only one form, set _formname automatically
if not '_formname' in data and len(self.forms) == 1: