0

我在 windows shell 中使用 httpie。我的命令如下所示:

http --form -v POST "http://192.168.1.1/set/time" category=Time settings={"timezone":"Universal","ntp":{"enable":"no"},"time":"11:19:53","date":"2018-10-31"}

但是,json 值是不带引号传输的:

{timezone:Universal,ntp:{enable:no},time:11:19:53,date:2018-10-31}

我怎样才能用报价传输?喜欢:

{"timezone":"Universal","ntp":{"enable":"no"},"time":"11:19:53","date":"2018-10-31"}
4

1 回答 1

0

"并且,需要转义:

http [...] settings={^"timezone^":^"Universal^"^,^"ntp^":{^"enable^":^"no^"}^,^"time^":^"11:19:53^"^,^"date^":^"2018-10-31^"}
于 2019-02-16T12:42:09.177 回答