Please SEARCH in this forum before posting your question. There's a good chance your question has already been asked.
If you are asking for technical help, you must provide the following information:
- Are you using MIT App Inventor Classic, MIT App Inventor 2, or something else (what?)
- What OS are you using? (e.g, MacOS 1.8, Windows 8, ...)
- What browser are you using (e.g, Chrome version 30, Firefox 24, IE 8, ...)
Also provide as much information as you can, such as screenshots and instructions that will let others duplicate the issue.
How can I make a http POST AND PUT REQUEST IN AppInventor2?
I am working with a webinterface, I tested the Post and Put request using Python using the code given bellow:
>>> import httplib, urllib
>>> params = urllib.urlencode({'@number': 12524, '@type': 'issue', '@action': 'show'})
>>> headers = {"Content-type": "application/x-www-form-urlencoded",
... "Accept": "text/plain"}
>>> conn = httplib.HTTPConnection("
bugs.python.org")
>>> conn.request("POST", "", params, headers)
>>> response = conn.getresponse()
>>> print response.status, response.reason
302 Found
>>> data = response.read()
>>> data
'Redirecting to <a href="
http://bugs.python.org/issue12524">
http://bugs.python.org/issue12524</a>'
>>> conn.close()
http://docs.python.org/2/library/httplib.html
I would like to know how the same thing can be done from an App developed using appinventor. The most important thing in this is I have to add params. And the python code also works when I modify the conn.request to conn.request("PUT", "", params, headers)
I hope anyone can help me in building an App Using appinventor which does the same work the python code does.