Below angular code which calls the WCF service.
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 service url in local
'http://localhost:34244/CitizenService.svc/register';
It fails with 405 error.
Anyone knows what could be the issue?