【发布时间】:2017-05-08 13:29:23
【问题描述】:
下面是调用 WCF 服务的 Angular 代码。
public customLogin(user: string, pass: string): Observable<string> {
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ method: "POST",headers: headers,body: user} );
return this.http.post(this.url, user, options)
.map(this.extractData)
.catch(this.handleError);
}
本地 WCF 服务 url
'http://localhost:34244/CitizenService.svc/register';
失败并出现 405 错误。
有人知道可能是什么问题吗?
【问题讨论】: