0
我試圖使用google safe browsing API
來檢查任何給定URL的分類。cURL POST請求問題
根據谷歌安全瀏覽API頁面(https://developers.google.com/safe-browsing/v4/lookup-api),我發佈cURL
到POST
a HTTP
請求並檢查網站分類。
作爲回報,我沒有看到對POST'ed的迴應。收到
響應:
#{}
所用命令:
#curl -H "Content-Type: application/json" -X POST -d ' { "client": { "clientId": "Test", "clientVersion": "1.0.0" }, "threatInfo": { "threatTypes": ["MALWARE", "SOCIAL_ENGINEERING"], "platformTypes": ["WINDOWS"], "threatEntryTypes": ["URL"], "threatEntries": [ {"url": "http://www.facebook.com"} ] } }' https://safebrowsing.googleapis.com/v4/threatMatches:find?key=AIzaSyD1IMgjaHEza6e9m_jwtjBgPmJX0IMKKIs HTTP/1.1
我已經檢查了命令,但不知道在那裏我犯錯誤。任何想法的人?
我們需要在有X'ed的位置放置有效的API密鑰。反正用API密鑰更新。 – Arun