Chap 6 - Server Communication $http Flashcards

1
Q

Ngresource

A

Permet de créer automatiquement des services d’accès à des api rest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Key of http response

A

Headers
Status
Config
Data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

$q service

A
$q.defer()
Deffered.resolve()
Deffered.reject()
Deffered.notify()
$q.reject

Permet de créer ses propres promesses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

$http API

A

get
put
delete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Config object http.get

A

Method, url,…,xsrfcookie

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

$httpProvider

A

Définition config. par défaut de $http

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Interceptor

A

Utilise par $httpProvider. Permet de faire un contrôle ou des actions avant chaque requête : log, add authorization request in the header

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Bonne pratiques

A

Wrap $http in services
Use interceptor
Chain interceptor
Leverage default

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Qu’est-ce qu’une promesse

A

Objet Javascript correspondant au résultat diffère d’une opération asynchrone.

Retourne par $http.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly