作者:元辉5678_915 | 来源:互联网 | 2023-08-22 16:43
HowtoproperlyPOSTalistofstringswithjQuerytoGoogleAppEngineapp?Icreatesomethinglike
How to properly POST a list of strings with jQuery to Google App Engine app? I create something like this:
如何使用jQuery正确地将字符串列表发布到Google App Engine应用程序?我创建这样的东西:
$.post("/add", {tags:['first tag','second tag','third tag']}
And then in FireBug I see it becomes something like this:
然后在FireBug中我看到它变成这样:
tags%5B%5D=first tag&tags%5B%5D=second tag&tags%5B%5D=third tag
I am not sure I send a list properly. If it's fine, then how to process this list with Python? I try to use something like this:
我不确定我是否正确发送了一份清单。如果没关系,那么如何用Python处理这个列表呢?我尝试使用这样的东西:
tagsList = self.request.get("tags")
But without much success. Thanks
但没有太大的成功。谢谢
2 个解决方案