Tried from various environments and getting the below response …
“
Unexpected error Error during Web API HTTP Request
HTTP Status Code: 502
HTTP Response Content: {“messages”:“The API is unreachable, please contact the API provider”, “info”: “Your Client (working) —> Gateway (working) —> API (not working)”}
”
चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:
const key = "your key"
const qs = obj => {
return new URLSearchParams(obj).toString();
}
const data = qs({
q: word,
source: “en”,
target: “es”,
})
const options = {
method: “POST”,
url: “https://google-translate1.p.rapidapi.com/language/translate/v2”,
headers: {
“content-type”: “application/x-www-form-urlencoded”,
“x-rapidapi-key”: key,
“x-rapidapi-host”: “google-translate1.p.rapidapi.com”,
},
data: data,
};
axios
.request(options)
.then(function (response) {
console.log(response.data);
})
.catch(function (error) {
console.error(99, error);
});
This work for me, essentially u have to build the query string first
@gopinath.it89 did you resolve it ? facing the same problem
Hello, I made some simple translator. Please see my API projects.
Dang i thought i was the only one
Same, not working
Getting the same error.