@@ -3,7 +3,7 @@ import {Observable, throwError, of} from 'rxjs';
3
3
import { HttpClient , HttpHeaders } from '@angular/common/http' ;
4
4
import * as _ from 'lodash' ;
5
5
import { environment } from '../../environments/environment' ;
6
- import { catchError } from 'rxjs/operators' ;
6
+ import { catchError , delay } from 'rxjs/operators' ;
7
7
8
8
export const API_BASE_URL = environment . URI ;
9
9
@@ -24,7 +24,7 @@ export class HttpHelperService {
24
24
get ( url : string , options ?: any ) : Observable < any > {
25
25
return this . http
26
26
. get ( API_BASE_URL + url , this . requestOptions ( options ) )
27
- . pipe ( catchError ( err => this . catchError ( err ) ) ) ;
27
+ . pipe ( delay ( 1000 ) , catchError ( err => this . catchError ( err ) ) ) ;
28
28
}
29
29
30
30
/**
@@ -38,7 +38,7 @@ export class HttpHelperService {
38
38
post ( url : string , body : any , options ?: any , isUpload ?: boolean ) : Observable < any > {
39
39
return this . http
40
40
. post ( API_BASE_URL + url , body , this . requestOptions ( options , isUpload ) )
41
- . pipe ( catchError ( err => this . catchError ( err ) ) ) ;
41
+ . pipe ( delay ( 1000 ) , catchError ( err => this . catchError ( err ) ) ) ;
42
42
}
43
43
44
44
/**
0 commit comments