更新时间:2022-02-04 15:34:38
两件事.首先,使用-L进行重定向.其次,直接放置到遥远的数据位置,例如
Two things. First, follow redirects with -L. Second, put directly to the away data location, like
curl -v -L -X PUT "https://developer-api.nest.com/structures/g-9y-2xkHpBh1MGkVaqXOGJiKOB9MkoW1hhYyQk2vAunCK8a731jbg/away?auth=<AUTH_TOKEN>" -H "Content-Type: application/json" -d '"away"'
PUT将覆盖某个位置的所有数据.上一条命令在逻辑上将结构的数据设置为{"away":"away"}
.
The PUT overwrites all data at a location. The previous command would logically be setting the structure's data to just {"away":"away"}
.