I am using microsoft-translator-text.p.rapidapi.com/Detect?api-version=3.0.
the website “test endpoints” is good
then I created a curl command according to code snippet. run it on my device, but it gots Bad Gateway. Where am I wrong
xxxx # curl -k -v -H “x-rapidapi-key: df480973f4msh126b7641153af48p15613
3jsne8dfc5d947f1” -H “x-rapidapi-host: microsoft-translator-text.p.rapidapi.com”
-H “content-type: application/json” --data “{“Text”:“morning”}” -X POST htt
ps://microsoft-translator-text.p.rapidapi.com/Detect?api-version=3.0
Note: Unnecessary use of -X or --request, POST is already inferred.
POST /Detect?api-version=3.0 HTTP/1.1
Host: microsoft-translator-text.p.rapidapi.com
User-Agent: curl/7.58.0
Accept: /
x-rapidapi-key: df480973f4msh126b7641153af48p156133jsne8dfc5d947f1
x-rapidapi-host: microsoft-translator-text.p.rapidapi.com
content-type: application/json
Content-Length: 18
< HTTP/1.1 502 Bad Gateway
< Content-Type: application/json
< Date: Wed, 13 Jan 2021 23:40:27 GMT
< Server: RapidAPI-1.2.6
< x-amz-apigw-id: ZHG03GG0oAMFn2Q=
< x-amzn-ErrorType: InternalServerErrorException
< x-amzn-RequestId: 256050dd-faa3-4b75-94de-9f05bd30d288
< X-RapidAPI-Region: AWS - us-west-2
< X-RapidAPI-Version: 1.2.6
< X-RateLimit-Characters-Limit: 500000
< X-RateLimit-Characters-Remaining: 499770
< X-RateLimit-Characters-Reset: 2663745
< Content-Length: 36ortiAP-431F # curl -k -v -H “x-rapidapi-key: df480973f4msh126b7641153af48p15613
3jsne8dfc5d947f1” -H “x-rapidapi-host: microsoft-translator-text.p.rapidapi.com”
-H “content-type: application/json” --data “{“Text”:“morning”}” -X POST htt
ps://microsoft-translator-text.p.rapidapi.com/Detect?api-version=3.0
Note: Unnecessary use of -X or --request, POST is already inferred.
POST /Detect?api-version=3.0 HTTP/1.1
Host: microsoft-translator-text.p.rapidapi.com
User-Agent: curl/7.58.0
Accept: /
x-rapidapi-key: df480973f4msh126b7641153af48p156133jsne8dfc5d947f1
x-rapidapi-host: microsoft-translator-text.p.rapidapi.com
content-type: application/json
Content-Length: 18
< HTTP/1.1 502 Bad Gateway
< Content-Type: application/json
< Date: Wed, 13 Jan 2021 23:40:27 GMT
< Server: RapidAPI-1.2.6
< x-amz-apigw-id: ZHG03GG0oAMFn2Q=
< x-amzn-ErrorType: InternalServerErrorException
< x-amzn-RequestId: 256050dd-faa3-4b75-94de-9f05bd30d288
< X-RapidAPI-Region: AWS - us-west-2
< X-RapidAPI-Version: 1.2.6
< X-RateLimit-Characters-Limit: 500000
< X-RateLimit-Characters-Remaining: 499770
< X-RateLimit-Characters-Reset: 2663745
< Content-Length: 36
< Connection: keep-alive
<
{“message”: “Internal server error”}FortiAP-431F #
< Connection: keep-alive
<
{“message”: “Internal server error”}FortiAP-431F #
Participez à la discussion - ajoutez un commentaire ci-dessous:
Hi. I’ve got the same problem. Did you resolve yours? If yes, could you tell me how? What was the problem?