我正在尝试使用 GET 到 Google Translation API 来翻译一个简单的字符串"I love you"
https://www.googleapis.com/language/translate/v2?q=I+love+you&target=es&key=***************
在浏览器中我得到:
{
"data": {
"translations": [
{
"translatedText": "te amo",
"detectedSourceLanguage": "en"
}
]
}
}
但是当我用 curl 尝试它时
curl https://www.googleapis.com/language/translate/v2?q=I+love+you&target=es&key=***************
我有
[3] 53561
[4] 53562
[1] Exit 127 https://www.googleapis.com/language/translate/v2?q=I+love+you
[2] Done target=es
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Required parameter: target",
"locationType": "parameter",
"location": "target"
}
],
"code": 400,
"message": "Required parameter: target"
}
}
这是我现在在推荐人中设置的内容
为什么我得到不同的结果?
我需要调整我的推荐人吗?
我需要再等几分钟吗?