HTTP要求に問題があります。 Ionic View、ブラウザ、Androidではすべてが正常に動作していますが、IOSでは動作しません。 GETリクエストはIOSでもうまくいきます。どんな推測でも、何ができますか?Ionic2 AppのIOSでPOST要求が機能しない
私はより多くの情報を提供することができます。必要な情報を教えてください。ここで私は私のpackage.jsonに持っているものです。
"dependencies": {
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/platform-server": "2.2.1",
"@ionic/cloud-angular": "0.7.0",
"@ionic/storage": "1.1.7",
"@types/moment-timezone": "0.2.32",
"ionic-angular": "2.0.0-rc.4",
"ionic-native": "2.4.1",
"ionicons": "3.0.0",
"moment": "2.15.1",
"moment-timezone": "0.5.7",
"ng2-translate": "5.0.0",
"rxjs": "^5.0.0-beta.12",
"zone.js": "0.6.26"
},
"devDependencies": {
"@ionic/app-scripts": "^1.0.0",
"sw-toolbox": "^3.4.0",
"typescript": "2.0.9"
},
バックエンドは、POSTリクエストの空白身体を受け取ります。ここに私が戻ってくるものは次のとおりです。
ERROR: {"_body":"{\"error\":\"Sign up error\",\"message\":{\"first_name\":[\"First Name cannot be blank.\"],\"last_name\":[\"Last Name cannot be blank.\"],\"email\":[\"Email cannot be blank.\"],\"device_id\":[\"Device Id cannot be blank.\"]}}","status":422,"ok":false,"statusText":"Bad Request","headers":{"Content-Type":["application/json; charset=UTF-8"],"Pragma":["no-cache"]},"type":2,"url":"http://app.EDITED"}
何かお気軽にお問い合わせください。ありがとうございました!
UPDATE:私たちは、HTTPSへの私たちのバックエンドを移動し、今ではすべてが
に移動することで、私達にあなたのコードをしてください表示する私たちが見ることができないものをデバッグすることはできません。 – Ivaro18
残念ながら、契約は私にそれを許可しません。私はちょうど私のコードでHTTPSのPOST要求がIOS上で正常に動作していることを知っていたので、私は問題がHTTPのURLを使用していると思います。 –
同様の問題を抱えている、httpsはこの問題を解決しました。 ionicで質問を投稿 - https://forum.ionicframework.com/t/ionic2-rc5-body-removed-from-post-put-calls/77591これまでの回答なし –