Sign Up

Sign In

Forget Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Discy Latest Questions

  • 0

I am downloading file using HTTP POST method. I want to call another method to show download progress to end user until file download complete. How to use reportProgress in HttpClient for this. downfile(file: any): Observable<any> {return this.http.post(this.url , app, { ...

  • 0

I am trying to get a list of Users from an API but I get the following error: TypeError: Cannot read property 'toLowerCase' of undefined at HttpXsrfInterceptor.intercept (http.js:2482) at HttpInterceptorHandler.handle (http.js:1796) at HttpInterceptingHandler.handle (http.js:2547) at MergeMapSubscriber.eval [as project] (http.js:1466) at MergeMapSubscriber._tryNext (mergeMap.js:128) at MergeMapSubscriber._next (mergeMap.js:118) at MergeMapSubscriber.Subscriber.next (Subscriber.js:92) at ...

  • 0

const headers = new HttpHeaders({ 'Content-Type': 'text/xml' }); headers.append('Accept', 'text/xml'); headers.append('Content-Type', 'text/xml'); this.http.get('getxmlurl', {headers: headers}).subscribe(response => { return '1234'; }); Hi I am using angular 4 httpclient to make a http get request from a spring controller which returns a XML response. The problem I ...

  • 0

I am trying to consume an API URL. I am calling the API with the below code. import {HttpClient, HttpClientModule, HttpParams} from "@angular/common/http";@Injectable() export class PropertyPrefService {constructor(private http: HttpClient, ...

  • 0

I need download an excel from my backend, its returned a file. When I do the request I get the error: TypeError: You provided ‘undefined’ where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. My code is: this.http.get(`${environment.apiUrl}/...`) ...

  • 0

I used Angular 4.2 with the Http service and I used the get method like this where params is a URLSearchParams object: this.http.get(url, {headers: this.setHeaders(), search: params})I want to migrate to Angular 5. http is now a HttpClient object like recommended by the angular team. I got an ...

  • 0

I used Angular 4.2 with the Http service and I used the get method like this where params is a URLSearchParams object: this.http.get(url, {headers: this.setHeaders(), search: params})I want to migrate to Angular 5. http is now a HttpClient object like recommended by the angular team. I got an ...

  • 0

So, I am trying to migrate from ‘old’ http to the new httpClient with the http client I am using this format in my service: return this.http.get(environment.api+ '.feed.json', requestOptions)how do I use this in httpClient? tried many thiungs… including return this.http.get(environment.api+ '.feed.json', {params: requestOptions.params})but ...

  • 0

I am trying to implement HttpCache through interceptor. Following is the caching-interceptor.service.ts I don’t understand, what are missing so it giving error No provider for HttpHandler. If I add HttpHandler in provider in module file, It start giving error for provide: HTTP_INTERCEPTORS, component.

close