我如何将以下 curl 命令从 Lyft api 转换为 http 接口请求(以便它们可以通过 web 执行,例如https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway ,+Mountain+View,+CA&key=YOUR_API_KEY )? 如果无法进行 http 请求翻译,我将如何在 R 中集成和处理这些 curl 命令?
#Authentication code
curl -X POST -H "Content-Type: application/json" \
--user "<client_id>:<client_secret>" \
-d '{"grant_type": "client_credentials", "scope": "public"}' \
'https://api.lyft.com/oauth/token'
#Search query
curl --include -X GET -H 'Authorization: Bearer <access_token>' \
'https://api.lyft.com/v1/eta?lat=37.7833&lng=-122.4167'