I am trying to post some data and I am passing an access token as query string. I will be getting a blob response from server. I used following code :
public issueId(asset: Type): Observable<Blob> {
let urlSearchParams = new HttpParams().set('access_token', this.cookieService.get('access_token'));
console.log('Entered DataService issueID');
return this.httpClient.post('http://localhost:3000/api/system/identities/issue', asset, {urlSearchParams},{responseType: "blob"});
}
I am getting error "Expected 2-3 arguments, but got 4". I am using angular 4. Asset is the body of post request.
{responseType: "blob"}and handle it once you got the response