Linked Questions

47 questions linked to/from Angular - Set headers for every request
54 votes
6 answers
182k views

I have an Ionic 2 application using Angular 2, which is sending an Http PUT to a ASP.NET Core API server. Here's the method I'm using to send the request: public update(student: Student): Promise<...
59 votes
10 answers
47k views

In angularjs, we have http interceptor $httpProvider.interceptors.push('myHttpInterceptor'); with which we can hook into all http calls, and show or hide loading bars, do logging, etc.. What is the ...
44 votes
4 answers
37k views

I want to integrate Angular 2 with Django and I have some questions to make. How can I change the interpolation syntax for Angular 2 from {{ }} to (( )) or something like this? How can I add the CSRF ...
Rus Mine's user avatar
  • 1,603
59 votes
7 answers
257k views

How do you add headers to your http request in Angular2 RC6? I got following code: login(login: String, password: String): Observable<boolean> { console.log(login); console.log(password)...
43 votes
4 answers
99k views

I need to upload a file and send some json along with it, I have this function: POST_formData(url, data) { var headers = new Headers(), authtoken = localStorage.getItem('authtoken'); ...
33 votes
3 answers
68k views

I`m trying to access a URL with Basic Authentication. The URL returns JSON data. How can I add my username and password to this http request below? private postsURL = "https://jsonExample/posts"; ...
8 votes
3 answers
29k views

So I am trying to use JSON web tokens for authentication and am struggling trying to figure out how to attach them to a header and send them on a request. I was trying to use https://github.com/auth0/...
3 votes
5 answers
23k views

I've problem with adding additonal headers to html post. with curl works very well like with postman. I can't add Authorization header to post request. my problem is similar to https://stackoverflow....
nicram's user avatar
  • 383
6 votes
3 answers
34k views

Im Getting following error while trying to pass header in HTTP.POST/GET request Argument of type '{header:Header;}' is not assignable to parameter of type 'RequestOptionsArgs'. Property 'null' is ...
8 votes
1 answer
9k views

I want to set the header Content-type: application/json in all my requests to my backend in Angular2. I use this in my main app.js file. let headers = new Headers({ 'Content-Type', 'application/...
6 votes
1 answer
12k views

I have a problem with receiving json from http.post. Let's make it clear a bit: This is my component file: import {Component} from 'angular2/core' import {Http, HTTP_PROVIDERS, Headers} from '...
elzoy's user avatar
  • 5,475
3 votes
2 answers
4k views

In angular 1, I was able to manipulate the http object so the request header for a post included authentication like this: $http.defaults.headers.common['Authorization'] = "Token " + sessionobject....
0 votes
2 answers
10k views

Good moorning everyone ! I'm working on a project with spring boot (JWT & Spring security ) and Angular5 in front-End . I'm now in a phase where i need to send the authenticated user's ID with the ...
dEs12ZER's user avatar
  • 858
5 votes
2 answers
10k views

I have java REST services and consumer in Angularjs 1.3. Services are JSON based and expect BASIC authentication (username-password). In AgJs 1.3, I used Base64 factory code (found on google) for ...
5 votes
1 answer
12k views

I have the code below: import { Component, OnInit, ElementRef } from '@angular/core'; import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms' @Component({ ...
user875139's user avatar
  • 1,621

15 30 50 per page
1
2 3 4