3

Nativescript-Vue を使用してネイティブ アプリを作成しています。最初のコンポーネントで、簡単な投稿リクエストを起動していますが、これは確実に機能しています (デスクトップ バージョンでテストしました)。しかし、私が無視する理由により、応答に問題があります。私の応答は、リクエストがパラメーターで正常に送信されたことを示していますが、status:null と data:"" を取得しています。これを修正する方法を知っている人はいますか?

このトピックを読んでいる人には、お時間をいただきありがとうございます。

axios({
method: 'post',
url: url,
data: querystring.stringify({
grant_type: config.grant_type,
username: config.API_username,
password: config.API_password,
APIKeys: config.API_key
}),
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
.then((response) => {
alert(JSON.stringify(response, null, 4));

})
.catch((error) => {
alert(JSON.stringify(error, null, 4));
});
4

4 に答える 4