Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
606 views

I have create my api/product-search.php backend in http://localhost/ like so: <?php header('Access-Control-Allow-Origin', '*'); header("Access-Control-Allow-Headers: Content-Type"); header("Access-...
user12505305's user avatar
1 vote
2 answers
3k views

I have an auth service with a login method and a login component. From my login components' onSubmit method I call the services' login method and subscribe to the answer. The challenging part is, ...
Allisone's user avatar
  • 9,174
-2 votes
1 answer
63 views

i am new in angular world. i trying to learn this framework but it is so HARD!... so in my first example i got error: import { BrowserModule } from '@angular/platform-browser'; import { NgModule } ...
გენო მუმლაძე's user avatar
11 votes
2 answers
31k views

My angular 4.3.2 code is calling my back-end service that takes 2-4 minutes to return. Using just the default this.http.get code, I see that the default timeout kicks in after 2 minutes. However when ...
Mike K.'s user avatar
  • 616
2 votes
1 answer
221 views

I need to add a token to the request in my interceptor. I keep on getting the error core.js:1673 ERROR TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, ...
Asool's user avatar
  • 14.3k
0 votes
3 answers
13k views

Actually I am trying to connect an Angular app with my Maven-Jersey-webapp(implements Rest Services concept) and getting this error. More Details: I am using Oracle10g XE Database Eclipse IDE for ...
Sanjeev Jangra's user avatar
-1 votes
1 answer
210 views

Working with angular 2 HTTP PUT request. I have a component and service. In the component I make request to update the attributes of account. It then calls the Service to update the account through ...
Nandini's user avatar
  • 31
0 votes
0 answers
453 views

I am moving my project from AngularJS to Angular and it is creating a different session for each request; why? I have used withCredentials, this is user.service.ts: loginUser(username,password) { ...
priya_singh's user avatar
  • 2,488
1 vote
1 answer
4k views

:) I have an Angular application (@angular/cli: ~6.0.3, typescript: ~2.7.2) which have a json file in assets folder. I'm trying to access this json file, write on it and save it. How can I do that? ...
psc37's user avatar
  • 81
0 votes
0 answers
7k views

I am building an angular2 app and I am pretty new at angular2. I am trying to make a post request but as an answer from the server, I got 500 INTERNAL SERVER ERROR and Response for preflight has ...
Nehil Danış's user avatar
0 votes
1 answer
427 views

//component.ts public items: any; getResult(){ var jsonBody = {}; jsonBody['activity'] = this.activity; jsonBody['seatnumber'] = this.seatNo; this.localService.postCall(jsonBody) ...
lakhan khandelwal's user avatar
2 votes
1 answer
1k views

I have reached the latest step in Angular's Tour-of-Heroes tutorial. After using the angular-in-memory-web-api, no data has appeared on my screen. There is no compilation error, but in the browser's ...
YTScorpion's user avatar
0 votes
1 answer
44 views

i have a problem receiving data to variable. this works: this.http.get(some_url).subscribe( data => { console.log(JSON.parse(data['_body'])) }); but if i try to get ...
AK96's user avatar
  • 1
1 vote
0 answers
2k views

I am using Angular 5! I am using HttpClient for every REST API request to my backend server. The issue I am facing currently is that a few API requests take longer to execute i.e approximately more ...
Nitish Kumar's user avatar
2 votes
1 answer
756 views

I have a service that takes too long to return. Once the user has submitted a request, he/she should be able to navigate to any other page. How can I alert her that the request she submitted has ...
karthikaruna's user avatar
  • 3,276
0 votes
0 answers
132 views

I am new angular 2. Currently I am working on application which has Padarn server at backend and HTML5 with Angular2 at front end. I wanted ship one password protected zip file to backend, to achieve ...
Tejashri's user avatar
2 votes
2 answers
8k views

I have a mean stack going. Angular 5. I'm grabbing data from a form and i'm calling a Service to handle sending the form-data to the backend api. The service makes use of the HttpClient. It sends ...
Edwin Martinez's user avatar
1 vote
1 answer
613 views

How can I cancel all pending promises in angular2. I know that promises are not cancellable, but is there some work around for this?How can I cancel all pending requests on logout. api-service get(...
RemyaJ's user avatar
  • 5,526
0 votes
0 answers
36 views

I am facing a very strange problem. I implemented a file upload function for PDFs with REST api and track the upload process like that. My upload function looks like this: upload(){ this....
Daniel Klotzsche's user avatar
0 votes
1 answer
2k views

I want to add http methods dyamicly based on my conditions. var obj = { fieldType:"button" label:"Submit" method:"put" //get, post, delete, etc... name:"submit" submitUrl:"http://apiurl.com"...
Tarun Kumar's user avatar
-1 votes
1 answer
84 views

In Angular, is it secure to use Http Get when calling Web API, supplying password in the field? Or is it more secure if one uses Http Post? The following is an example on how to perform Http.get in ...
user1034912's user avatar
  • 2,348
-3 votes
2 answers
51 views

first : this.http.get('http://localhost:3000/users). map(users=>users.json()) .subscribe( users=>{ let user : User=users[0]; console.log(user); }...
prakash kumar's user avatar
3 votes
1 answer
4k views

I am rather new to Angular and now am upgrading from "the old" Http API to the new HttpClient API. Therefor I have to use the new HttpHeaders and HttpParams, which works fine so far. But the ...
Samarek's user avatar
  • 444
4 votes
1 answer
9k views

I have an Angular 4 Component that is calling a Service to get data. Not the strangest of situations. After I retrieve the data and need to transform it and filter it. Apparently the way to do this ...
Andrew Cooper's user avatar
0 votes
2 answers
667 views

I am trying to convert a json response into an array in angular 2. The following is the code i have used, .ts file response; resp; constructor(private http:Http) { } get() { ...
user avatar
0 votes
0 answers
4k views

The following is the fragments of code which I am using : addorders.component.ts import { Component, OnInit } from '@angular/core'; import {Http} from '@angular/Http'; import {Headers} from '@...
user avatar
0 votes
2 answers
73 views

I want to call service only when user input is not empty and ith some delay so user finish the typing. Below is the code. Please help. Component.ts searchByName(event) { this.facilityService....
pawankumar meshram's user avatar
1 vote
1 answer
209 views

I'm trying to create a login system for a project and I have an auth-service, token-service, and my login-component, I just started with RxJS so this is most likely an extremely stupid question. My ...
Winston Zhao's user avatar
0 votes
2 answers
95 views

My Api is giving me different types of status codes for warnings and errors. I have to show different alerts based on response. I am calling http service like this: service.ts @Injectable() export ...
Runali's user avatar
  • 342
0 votes
1 answer
1k views

How can I get data return from post service as I am geeting subscription always. Even i try to convert in my app component I am not able to it. facility_sevice.ts saveFacility(facility) { const ...
pawankumar meshram's user avatar
1 vote
1 answer
293 views

I have a ASP.NET core web application with angular2 for client-facing.For specific reasons I want to increase the timeout of Http calls from angular2 to back-end server from default to 8 minutes.I ...
Karthiga Sundarajan's user avatar
0 votes
0 answers
228 views

I am trying to write a unit test that tests that json i get from calling my Api validates against a mock object, but i always ends up with that the data returned from the WebApi is undefined. I ...
Tony's user avatar
  • 1,660
1 vote
0 answers
1k views

Currently I am uploading file using angular2-http-file-upload and send it to django back-end and it work fine with small files here is how I done it but when uploading large file 35Mb-600Mb its ...
Nazir Ahmed's user avatar
1 vote
1 answer
885 views

I'm wondering how can I get the body of an HTTP POST request in Angulars2. when i get back to the error method the body is an accessible. return this.http.post(requestUrl, **body**, options) .map((...
guy sandler's user avatar
0 votes
1 answer
3k views

I am trying to use angualrio to read from an array from a json file following this tutorial getting-started-with-angular-2-step-by-step-6-consuming-real-data-with-http/. However I am getting the ...
A.Shoman's user avatar
  • 3,094
6 votes
0 answers
8k views

I am trying to test the HTTP calls and referring to the following page to write unit tests: https://angular-2-training-book.rangle.io/handout/testing/services/mockbackend.html But when I looked on ...
Abhishek Sharma's user avatar
2 votes
1 answer
2k views

This works: this.http.get('/doesntexist1') .finally(() => console.log('finally1')) .subscribe(() => { }); But this doesn't: const obs = this.http.get('/doesntexist2'); obs.finally(() => ...
benji's user avatar
  • 2,511
4 votes
2 answers
8k views

I've upgraded an app from Angular 4.2 to 5 but after changed Http to HttpClient got error on POST request: error the server responded with a status of 415 (Unsupported Media Type) in app.module I'...
mrapi's user avatar
  • 6,081
6 votes
4 answers
6k views

To know if a request has completed, I do if (httpEvent instanceof HttpResponse). Likewise, how to know if a request is cancelled in HttpInterceptor? Below is my intercept function. intercept(...
karthikaruna's user avatar
  • 3,276
-3 votes
1 answer
2k views

Good day, How can i get the api data with token using angular 2/4? Here is my code: import { Component, ViewEncapsulation } from '@angular/core'; import { Http, Response } from '@angular/http'; ...
Jydon Mah's user avatar
  • 383
3 votes
0 answers
2k views

I have some data that has to be loaded before the page loads and I'm using route resolvers to achieve this. Below is my code. Service: getUsernamesAndBUs(): Observable<any> { return ...
karthikaruna's user avatar
  • 3,276
1 vote
1 answer
2k views

Okay so I have been facing the dreadful: TypeError: Cannot read property 'Id' of undefined Before we get started: @angular/cli: 1.4.4 node: 6.10.3 npm: 3.10.10 Just to give more context, I am ...
Harold_Finch's user avatar
1 vote
3 answers
1k views

I am working on a mobile app. I need to fetch some data from WordPress website but the http request always through error Response for preflight has invalid HTTP status code 403 Typescript this._http....
shah's user avatar
  • 1,169
4 votes
1 answer
7k views

I made an angular application that is making http GET request every two seconds to update a dashboard. But too often I receive a HTTP error 429 (Too Many Request). I saw in the Firefox developer ...
alvaropgl's user avatar
  • 849
1 vote
0 answers
528 views

I want to use static HTTP client service for some reasons. I tried it like the following but I got an error. Is creating static the service possible? static service: import { Http, URLSearchParams, ...
zono's user avatar
  • 8,614
5 votes
2 answers
5k views

I am using observable in service getMembers(): Observable<any[]> { return this._http.get('http://localhost/membership/main/getUsers') .map(response => response.json() ); } component ...
edizonv's user avatar
  • 449
-1 votes
1 answer
915 views

I am using HTTP angular2 to post some data. It is working ok, I can send data from angular2 service , receive it in my express backend. I want to get the returned data from express. If i use .get ....
raju's user avatar
  • 7,004
1 vote
1 answer
830 views

I'm using Angular 4.4.4 and I need to set the Authorization header for a GET request. I've studied the docs and the code to figure out how to do this. This was the result: const headers = new Headers(...
Jeanluca Scaljeri's user avatar
0 votes
0 answers
47 views

i create a custom http extends HttpInterceptor, like this: @Injectable() export class AuthInterceptor implements HttpInterceptor { constructor(private router:Router, private store: ...
jomalone_jia's user avatar
-1 votes
2 answers
3k views

I am using promise to retrieve a User-Details object in a Angular 4 app using Typescript. Now, I am using part of that object at two different places in my application using simple get request. ...
Azim Saiyed's user avatar

1
2 3 4 5
8