代码之家  ›  专栏  ›  技术社区  ›  MyNameIsGuzse

POST请求不会从角度触发

  •  0
  • MyNameIsGuzse  · 技术社区  · 5 年前

    我确保数据库功能在ASP.net中与swagger一起工作

    export class AlloutProvider {
        url: string;
        constructor(private _http: HttpClient) {
            this.url = "http://localhost:33324/api/v1"
        };
    
        postTeam(team: Team) {
            console.log(this.url + "game/team")
            console.log(JSON.stringify(team))
            return this._http.post(this.url + "game/team", JSON.stringify(team));
        }
    }
    

    Verification of the URL

    1 回复  |  直到 5 年前
        1
  •  1
  •   Thiago Carneiro Feitosa    5 年前

     this._http.post(this.url + "game/team", JSON.stringify(team));
    

    对于

    this._http.post(this.url + "/game/team", JSON.stringify(team));