Skip to content

Commit 82ed469

Browse files
committed
Fix Request.SetPostData() method (Issue cztomczak#228)
1 parent e2124ad commit 82ed469

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/compile_time_constants.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# This file was generated by setup.py
2-
DEF UNAME_SYSNAME = "Windows"
2+
DEF UNAME_SYSNAME = "Linux"
33
DEF PY_MAJOR_VERSION = 2

src/request.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,14 @@ cdef class PyRequest:
136136
raise Exception("Invalid element in postData: %s" % (
137137
pyElement))
138138
postData.get().AddElement(postDataElement)
139+
self.GetCefRequest().get().SetPostData(postData)
139140
elif type(pyPostData) == dict:
140141
pyElement = urllib.urlencode(pyPostData)
141142
pyElement = str(pyElement)
142143
postDataElement = CefPostDataElement_Create()
143144
postDataElement.get().SetToBytes(len(pyElement), <char*>pyElement)
144145
postData.get().AddElement(postDataElement)
146+
self.GetCefRequest().get().SetPostData(postData)
145147
else:
146148
raise Exception("Invalid type of postData, only dict|list allowed")
147149

0 commit comments

Comments
 (0)