Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在python eve中读取post变量?_Python_Rest_Eve - Fatal编程技术网

如何在python eve中读取post变量?

如何在python eve中读取post变量?,python,rest,eve,Python,Rest,Eve,我们如何在python eve中读取post变量 如果我这样做 curl -d [ {"firstname" : "Barack", "lastname":"Obama"} ] <url> curl-d[{“firstname”:“Barack”,“lastname”:“Obama”}] 如何读取程序中的post变量[firstname和lastname] 谢谢 我在发布这篇文章时提出警告,您可能没有正确定义和请求资源 这将使新发布的值在名为“items”的列表中可用 from

我们如何在python eve中读取post变量

如果我这样做

curl -d [ {"firstname" : "Barack", "lastname":"Obama"} ] <url>
curl-d[{“firstname”:“Barack”,“lastname”:“Obama”}]
如何读取程序中的post变量[firstname和lastname]


谢谢

我在发布这篇文章时提出警告,您可能没有正确定义和请求资源

这将使新发布的值在名为“items”的列表中可用

from eve import Eve

def read_insert(resource, items):
  print 'resource: "%s"' % resource
  print 'items: "%s"' % items
  pass

if __name__ == '__main__':
  app = Eve()
  app.on_insert += read_insert

  app.run()

你想要一个前缀,还是使用端点的过滤器?当我说curl时,我想得到数据中所有人的列表-我不想过滤或使用前缀,但这与仅
/people/
不同?我正在试验我的应用程序。这就是MUURL,我想保持这样。后来我想和英国首相柯尔一世做一次手术。定制对我的应用程序非常有帮助