모든 토론으로 돌아가기
Having a 400 error status using google translate and axios (post method)
I am trying to post a word to get its translated version but i keep getting a 400 error and when i try same code here on test endpoint button, it works perfectly, what might be the reason for the 400 error
아래에 의견을 추가하고 토론에 참여하세요.
새 댓글을 게시하려면 로그인 / 가입
I was able to fix the issue using request
var request = require(‘request’);
use this to make request to the API , axios has some issues with making request to this API
Not working. Receiving this in postman, where obviously I xxxx out my key. In fact, none of the endpoints are working as of 11:42 EST.
Error: incorrect header check
Warning: This request did not get sent completely and might not have all the required system headers
Accept-Encoding: gzip, deflate, br
Hey kizito917, it looks like there’s an issue with how the axios code snippet is being generated. If you alter that snippet to send the data as URL encoded parameters as expected, it will work through axios! https://share.getcloudapp.com/WnuGXryo I’ll reach out to RapidAPI to investigate why this is happening.