fix content uploads
authorKenneth Reitz <me@kennethreitz.com>
Sun, 23 Oct 2011 22:24:14 +0000 (18:24 -0400)
committerKenneth Reitz <me@kennethreitz.com>
Sun, 23 Oct 2011 22:24:14 +0000 (18:24 -0400)
requests/models.py

index ce7c55f59697a338400a87edb0ca38e1246a4cf9..152ef854b3206aa2dba49893a9378a4d76f04b34 100644 (file)
@@ -347,6 +347,16 @@ class Request(object):
                 for (k, v) in self.files.items():
                     fields.update({k: (k, v.read())})
                 (body, content_type) = encode_multipart_formdata(fields)
+            else:
+                pass
+                # TODO: Conflict?
+        else:
+            if self.data:
+                body = self._enc_data
+                content_type = 'application/x-www-form-urlencoded'
+                print body
+
+
 
         # TODO: Setup cookies.