Skip to content

Commit 7b16081

Browse files
Fix angular2 api base:
- doPatch body added - HttpOptions -> responseType type
1 parent 7b35cc3 commit 7b16081

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ApiBase/api-base.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface HttpOptions {
1616
[param: string]: string | string[];
1717
};
1818
reportProgress?: boolean;
19-
responseType?: 'json';
19+
responseType?: any;
2020
withCredentials?: boolean;
2121
}
2222

@@ -115,7 +115,7 @@ export class ApiBaseService {
115115
): Observable<any> {
116116
const options = this.getOptions(customOptions);
117117
url = this.parseURLParams(url, params);
118-
return this.http.patch(this.serverURL + url, options);
118+
return this.http.patch(this.serverURL + url, data, options);
119119
}
120120

121121
public doDelete(

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
- Support for arrays in `api` responses.
1111

12+
### Fixed
13+
- `API Base` (angular 2):
14+
- Added `body` (data) for `patch` request
15+
- Fix `repsonseType` type for `HttpOptions`
16+
1217
## [2.5.1] - 2021-02-04
1318

1419
### Added

0 commit comments

Comments
 (0)