Angular Native不将帖子正文发送到服务器

时间:2020-02-15 08:48:47

标签: sqlite https nativescript angular2-nativescript nativescript-angular

我正在使用Angular Nativescript应用程序。我尝试在其中发布数据到服务器,但是当我使用本机脚本预览应用程序预览时,它总是将空白正文发送到服务器。 这是我的服务功能。

register(data) {
    console.log(this.regUrl)
    return this.http.post(this.regUrl, data, { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) });
  }

这是我的开发依赖项:

"dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "@nativescript/theme": "~2.2.1",
    "nativescript-angular": "~8.20.3",
    "nativescript-appavailability": "^1.3.2",
    "nativescript-phone": "^1.4.1",
    "nativescript-social-share": "^1.6.0",
    "nativescript-sqlite": "^2.3.3",
    "nativescript-toast": "^2.0.0",
    "nativescript-ui-sidedrawer": "~8.0.0",
    "reflect-metadata": "~0.1.12",
    "rxjs": "^6.4.0",
    "tns-core-modules": "~6.3.0",
    "zone.js": "~0.9.1"
  },

编辑:

Sqlite导致了此问题。但它以前工作正常。

0 个答案:

没有答案