Igor Minar
|
188bdf7768
|
feat($http): add response interceptors
|
2011-11-30 14:49:35 -05:00 |
|
Igor Minar
|
dbd880cc0a
|
feat($http): add promise support
quite messy, some tests are missing, contains an experimental jasmine DI support)
|
2011-11-30 14:49:35 -05:00 |
|
Vojta Jina
|
92995bbce9
|
fix($http): default json transformation should not crash on angular template
The way we determine whether it's json is lame anyway. We need to change that.
We should probably check the content type header...
|
2011-11-30 11:17:25 -05:00 |
|
Vojta Jina
|
b9707d910e
|
style(): get rid off some jsl warnings
|
2011-11-30 11:17:25 -05:00 |
|
Vojta Jina
|
5bbd64ac65
|
feat($http): allow passing custom cache instance per request
You can still use cache: true, which will use $http's default cache.
|
2011-11-30 11:17:25 -05:00 |
|
Vojta Jina
|
6290bd4587
|
refactor(mock.$httpBackend): rename when().then() to when().respond()
|
2011-11-30 11:17:24 -05:00 |
|
Vojta Jina
|
afbe073121
|
feat(mock.$httpBackend): add verifyNoOutstandingRequest method
+ rename verifyExpectations to verifyNoOutstandingExpectation
|
2011-11-30 11:17:23 -05:00 |
|
Vojta Jina
|
7b705df2b7
|
feat($http): broadcast $http.request event
|
2011-11-30 11:17:23 -05:00 |
|
Vojta Jina
|
972c3e9be0
|
refactor($http): change callback matching mechanism
|
2011-11-30 11:17:22 -05:00 |
|
Vojta Jina
|
fe633dd0cf
|
fix($http): allow multiple json vulnerability prefixes
We strip out both:
)]}',
)]}'
|
2011-11-30 11:17:22 -05:00 |
|
Vojta Jina
|
fdcc2dbfd3
|
feat($http): expose pendingRequests and configuration object
- $http.pendingRequests is now an array of pending requests
- each request (its future object) has public property configuration
|
2011-11-30 11:17:22 -05:00 |
|
Vojta Jina
|
cd28a2e952
|
feat(mocks.$httpBackend): add $httpBackend mock
$httpBackend mock allows:
- expecting (asserting) requests
- stubbing (responding without asserting)
Add empty $httpBackend service (currently just wrapper for $browser.xhr)
|
2011-11-30 11:12:14 -05:00 |
|
Vojta Jina
|
59adadca08
|
feat($http): new $http service, removing $xhr.*
Features:
- aborting requests
- more flexible callbacks (per status code)
- custom request headers (per request)
- access to response headers
- custom transform functions (both request, response)
- caching
- shortcut methods (get, head, post, put, delete, patch, jsonp)
- exposing pendingCount()
- setting timeout
Breaks Renaming $xhr to $http
Breaks Takes one parameter now - configuration object
Breaks $xhr.cache removed - use configuration cache: true instead
Breaks $xhr.error, $xhr.bulk removed
Breaks Callback functions get parameters: response, status, headers
Closes #38
Closes #80
Closes #180
Closes #299
Closes #342
Closes #395
Closes #413
Closes #414
Closes #507
|
2011-11-30 11:12:14 -05:00 |
|