| 8 | * |
| 9 | */ |
| 10 | export interface Middleware { |
| 11 | /** |
| 12 | * Modifies the request before the request is sent. |
| 13 | * |
| 14 | * @param context RequestContext of a request which is about to be sent to the server |
| 15 | * @returns an observable of the updated request context |
| 16 | * |
| 17 | */ |
| 18 | pre(context: RequestContext): Observable<RequestContext>; |
| 19 | /** |
| 20 | * Modifies the returned response before it is deserialized. |
| 21 | * |
| 22 | * @param context ResponseContext of a sent request |
| 23 | * @returns an observable of the modified response context |
| 24 | */ |
| 25 | post(context: ResponseContext): Observable<ResponseContext>; |
| 26 | } |
| 27 | |
| 28 | export class PromiseMiddlewareWrapper implements Middleware { |
| 29 |
no outgoing calls
no test coverage detected