如何在restful api端点发送多个ID

时间:2018-04-13 07:04:55

标签: typescript angular5 restful-authentication

终点格式为http://localhost:8080/api/user/name/id/uid

this.http.get('/api/user/' + this.authService.name + this.authService.sid+ this.authService.userid  )
      .subscribe(result => {
        console.log('get ====>' + JSON.stringify(result));
      });

1 个答案:

答案 0 :(得分:0)

只需放置 +' /' + 它将给出终点格式

this.http.get('/api/user/' + this.authService.namespace + '/' + this.authService.userid + '/' + this.authService.sid )