You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having problems to use the library with HttpClient because when I call the subscribe, the method returns a result from Options request and after the result from GET,POST,PUT,DELETE request. And this behavior doesn't happen when I user the HttpClient directly.
I'm really want to continue using your library because It's one that already uses HttpClient and now I'm having a necessity to use the HttpInterceptors in my project. Before this, I was using https://www.npmjs.com/package/ng2-http but they don't have global interceptors support yet.
When I use raw HttpClient like this, the result of subscribe is correct.
let post = this.http.post(apiEndpoint + 'core/company/find-user-companies', this.model, { headers: new HttpHeaders().set('Content-Type', 'application/json') }); post.subscribe((res) => { console.log('COMPANY SEM LIB', res); });
But when I use the Library, the result is first undefined and after the correct response.
`@Injectable()
export class CompanyService extends RestClient {
Subscribe executing twice times.
I'm having problems to use the library with HttpClient because when I call the subscribe, the method returns a result from Options request and after the result from GET,POST,PUT,DELETE request. And this behavior doesn't happen when I user the HttpClient directly.
I'm really want to continue using your library because It's one that already uses HttpClient and now I'm having a necessity to use the HttpInterceptors in my project. Before this, I was using https://www.npmjs.com/package/ng2-http but they don't have global interceptors support yet.
When I use raw HttpClient like this, the result of subscribe is correct.
let post = this.http.post(apiEndpoint + 'core/company/find-user-companies', this.model, { headers: new HttpHeaders().set('Content-Type', 'application/json') }); post.subscribe((res) => { console.log('COMPANY SEM LIB', res); });
But when I use the Library, the result is first undefined and after the correct response.
`@Injectable()
export class CompanyService extends RestClient {
...
}`
The text was updated successfully, but these errors were encountered: