Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
fix(restModel): I forgot to change on restModel
Browse files Browse the repository at this point in the history
  • Loading branch information
rosostolato committed Aug 14, 2018
1 parent bf07f62 commit 7379bef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/restModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@ export class RestModelBase<T> {
const headers = new HttpHeaders(this.getDefaultHeaders());
const url = this.getFullPath();

const req = new HttpRequest(
let req = new HttpRequest(
method,url, data, {
headers, params
});

// pass through request interceptor
this._base.requestInterceptor(req);
req = this._base.requestInterceptor(req);

// the observable to return
const requestObservable = this._base.http.request(req);
const requestObservable = this._base.http.request<any>(req);

const observable = new Observable<any>(observer => {
// pass through response interceptor
this._base.FullResponseInterceptor(requestObservable)
this._base
.FullResponseInterceptor(requestObservable)
.subscribe(response => {
if (response.type === HttpEventType.Response) {
observer.next(response.body);
Expand Down

0 comments on commit 7379bef

Please sign in to comment.