This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Breaks "JSON" xhr method is now called "JSONP"
If jsonp is not successfull, we return internal status -2. This internal status should by normalized by $xhr into 0, but $xhr needs to distinguish between jsonp-error/abort/timeout (all status 0).
IE6, IE7 is sync when serving content from cache. We want consistent api, so we have to use setTimeout to make it async.
Timeouted request responds internal status code -1, which should be normalized into 0 by $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 accepts parameters: response, status, headers Closes angular#38 Closes angular#80 Closes angular#180 Closes angular#299 Closes angular#342 Closes angular#395 Closes angular#413 Closes angular#414 Closes angular#507
$httpBackend mock allows: - expecting (asserting) requests - stubbing (responding without asserting) Add empty $httpBackend service (currently just wrapper for $browser.xhr)
- remove whole $browser.xhr stuff - remove whole mock $browser.xhr stuff - add $httpBackend service + migrate unit tests from $browser - add temporary API to access $browser's outstandingRequests count
- $http.pendingRequests is now an array of pending requests - each request (its future object) has public property configuration
We strip out both: )]}', )]}'
Breaks Disabling $resource caching for the moment.
…rs when expected different
+ rename verifyExpectations to verifyNoOutstandingExpectations
I'm killing this PR |
This was referenced Dec 23, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
preliminary version, not to be released with the http branch.
I want to use this only in feedback and if it works well we can consider shipping it with angular or maybe as an extra angular module. (that's why I use angular.forEach instead of forEach, but I made it part of angularFiles so that I can easily run tests).