angular-http Questions
21
Solved
In the code below, the AngularJS $http method calls the URL, and submits the xsrf object as a "Request Payload" (as described in the Chrome debugger network tab). The jQuery $.ajax method does the ...
Ephesus asked 11/7, 2012 at 22:44
2
Solved
I need help in handling expired token in my angular application. My api has the expired time but my problem is when i forgot to log out of my angular application, after some time, i still can acces...
Godmother asked 11/9, 2017 at 2:4
3
Solved
I have an auth-interceptor.service.ts to handle the requests
import {Injectable} from '@angular/core';
import {HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from '@angula...
Stonemason asked 2/9, 2017 at 19:6
3
I hope everyone is doing great. I've recently started working with angular 4.4, i've been trying to post data to my api server, but unfortunately it's not working. I've spent like 2 days on it but ...
Prurigo asked 12/10, 2017 at 14:16
1
Solved
Before angular's new HttpClient was introduced, our objects returned from the http api call could be validated with the instanceof keyword. they no longer can with the HttpClient Module. I'm trying...
Prescind asked 21/5, 2018 at 15:51
8
Solved
Given a Ajax request in AngularJS
$http.get("/backend/").success(callback);
what is the most effective way to cancel that request if another request is launched (same backend, different paramete...
Slaughter asked 18/12, 2012 at 7:12
1
Solved
I wrote a function that is pipe-able:
HandleHttpBasicError<T>()
{
return ((source:Observable<T>) => {
return source.pipe(
catchError((err:any) => {
let msg = '';
if(err &...
Ermines asked 11/5, 2018 at 15:27
4
Solved
I have a service (lets call it MySharedService) which multiple components use. Inside MySharedService, I call another service that makes API calls. MySharedService holds a JavaScript object that is...
Discontented asked 2/5, 2018 at 18:49
2
i have a problem in making my caching more simpler. I think there is a better way to do this. My problem is that i have to do this "caching" codes in every get() function which is results in longer...
Arand asked 26/9, 2017 at 1:45
1
I'm just trying to prerender an component with Angular Universal which fetches data with httpClient from the /static folder within the app itself.
How do I use httpClient correctly in Angular Uni...
Fairish asked 18/1, 2018 at 17:24
1
Solved
For some reason, the internet is devoid of examples on how to do this in Angular 4 (which uses TypeScript, which doesn't let you skip including option properties like the JavaScript it transpiles i...
Humperdinck asked 29/12, 2017 at 4:59
1
I have a data service which fetches the data from server and makes multiple requests which then return an array of observables. I want to test the data.
What i tried doing is in the mockrespone I ...
Gabbro asked 1/11, 2017 at 8:44
2
Solved
I'm trying to use retryWhen in HTTP calls.
It works perfectly when try to use like this:
return this.http.get(`${environment.apiUrl}/track/${this.user.instance._id}/${this.currentPlayer.playlist....
Milker asked 6/12, 2016 at 21:57
3
Solved
I have been trying to get an array of objects from node to a service onInit and assign it to component. I am able to view data in service but when i try to assign to a variable in component, I get ...
Bellicose asked 20/8, 2017 at 13:37
37
Solved
Could anyone tell me why the following statement does not send the post data to the designated url? The url is called but on the server when I print $_POST - I get an empty array. If I print messag...
Amorino asked 8/10, 2013 at 17:7
1
Solved
I'm making a request to a server that has the following routes:
app.use('/401', (req, res) => res.status(401).end());
app.use('/403', (req, res) => res.status(403).end());
app.use('/404', (r...
Ease asked 26/7, 2017 at 17:5
3
Solved
I am new to angular2. My server(spring) responds authentication with a set-cookie value in its response headers.
How to set that cookie to the request headers for the next API calls?
I searched ...
Nonmetallic asked 13/4, 2017 at 11:18
5
Solved
I'm trying to write an autocomplete directive that fetches data from the server using an $http request (without using any external plugins or scripts). Currently it works only with static data. Now...
Handtomouth asked 27/8, 2013 at 8:16
2
I'm using angular2 and typescript.
I'm trying to post to my mail chimp subscription list.
My code so far:
constructor(router: Router, http: Http){
this.router = router;
this.http = http;
...
Epithelium asked 2/2, 2016 at 14:12
2
Solved
I am trying to develop an application with Spring Boot for the back end and Angular 2 for the front end.
Actually i have connection problems, when i accessing on the mvc login page from spring.
I...
Rowena asked 29/11, 2016 at 10:59
3
Solved
Sometimes, the API I'm using will return 200 ok even though there has been an error. The response JSON object will look something like:
{
error: true
}
I've built a $http response interceptor t...
Horsy asked 14/2, 2014 at 11:29
1
I have a web API 2 controller:
[HttpGet]
[Route("api/MyRoute/{date:datetime}")]
public IHttpActionResult Get(DateTime date)
{
return Ok(date);
}
And an angular $http get call:
$http.get("/api/...
Ralline asked 28/6, 2017 at 11:12
3
Solved
How do I create an Angular 4 client for a Java Project Reactor reactive Flux API? The sample below has two APIs: a Mono API; and, Flux API. Both work from curl; but in Angular 4 (4.1.2) only the Mo...
Fruit asked 15/5, 2017 at 22:41
2
Solved
I have a REST api developed using SpringBoot and it contains the implementation for JWT for authentication and authorization. A FilterRegistrationBean is used for that.
I have a class called JwtF...
Hibbard asked 13/5, 2017 at 17:16
1
Edit 1: Guys, I notice that I call $http.get('/posts') (for some special purpose) in my authentication factory. Sorry for the stupid question. I will delete it when the bounty is end.
I have the f...
Talamantes asked 18/4, 2017 at 0:10
© 2022 - 2024 — McMap. All rights reserved.