我们正在尝试在Windows CMD窗口中运行以下多行curl命令:
curl -H 'Authorization: Token <SERVER_TOKEN>' \
-H 'Accept-Language: en_US' \
-H 'Content-Type: application/json' \
'https://api.uber.com/v1.2/estimates/price?start_latitude=37.7752315&start_longitude=-122.418075&end_latitude=37.7752415&end_longitude=-122.518075'
这样做时,似乎正在分别处理每一行代码。
答案 0 :(得分:0)
这有效:
curl "https://api.uber.com/v1.2/estimates/price?start_latitude=37.7752315&start_longitude=-122.418075&end_latitude=37.7752415&end_longitude=-122.518075" -H "Authorization: Token YNjXGKdc8AcnPGzGf-qFm2eFKGeG6RpOHLLgXLH-" -H "Accept-Language: en_US" -H "Content-Type: application/json"
显然,需要双引号,而不是单引号。