I am trying to send POST data to a server using urlfetch in AppEngine. Some of these POST data elements have the same name, but with different meanings.
form_fields = {
"data": "foo",
"data": "bar"
}
form_data = urllib.urlencode(form_fields)
result = urlfetch.fetch(url="http://www.foo.com/", payload=form_data, method=urlfetch.POST, headers={'Content-Type': 'application/x-www-form-urlencoded'})
However, in this example, the server seems to receive only one element with a name datawith a value bar. How can I solve this problem?
nip3o source
share