在Windows命令提示符

时间:2018-02-24 20:53:58

标签: python request httpie

如何在Windows命令提示符下的httpie中更正此请求的输入?

http POST http://localhost:1337/api/articles title = TestArticle author =' John Doe'描述=' lorem ipsum dolar sit amet' images:=' [{" kind":" thumbnail"," url":" http://habrahabr.ru/images/write-topic.png"} ,{" kind":" detail"," url":" http://habrahabr.ru/images/write-topic.png"}]'

但我收到错误:http:错误:参数REQUEST_ITEM:" Doe'"不是有效值

我用双引号替换了所有引号

http POST http://localhost:1337/api/articles title = TestArticle author =" John Doe" description =" lorem ipsum dolar sit amet" images:=" [{" kind":" thumbnail"," url":" http://habrahabr.ru/images/write-topic.png"} ,{" kind":" detail"," url":" http://habrahabr.ru/images/write-topic.png"}]"

但它也不起作用,在这种情况下,我收到错误:

http:错误:" images:= [{kind:thumbnail,url:http://habrahabr.ru/images/write-topic.png},{kind:detail,url:http://habrahabr.ru/images/write-topic.png}]":期待财产用双引号括起来的名称:第1行第3列(字符2)

0 个答案:

没有答案