| Age | Commit message (Collapse) | Author |
|
|
|
The params parameter can now be used to serialize parameters in the URLs. The serialization does proper escaping and JSON encoding if it is an object.
|
|
When a http request has no data (body), we should not send the
Content-Type header as it causes problems for some server-side
frameworks.
Closes #749
|
|
|
|
|
|
|
|
- there are too many unknowns about PATCH, so I'm dropping its support until we know that this is actually useful
- expectGET, expectHEAD and expectJSON (and the same for whenXXX) should not require response data to be specified
|
|
|
|
|
|
$http:
- use promises internally
- get rid of XhrFuture that was previously used internally
- get rid of $browser.defer calls for async stuff (serving from cache),
promises will take care of asynchronicity
- fix transformation bugs (when caching requested + multiple request
pending + error is returned)
- get rid of native header parsing and instead just lazily parse the
header string
$httpBackend:
- don't return raw/mock XMLHttpRequest object (we don't use it for
anything anymore)
- call the callback with response headers string
mock $httpBackend:
- unify response api for expect and when
- call the callback with response headers string
- changed the expect/when failure error message so that EXPECTED and GOT
values are aligned
Conflicts:
src/service/http.js
test/service/compilerSpec.js
test/service/httpSpec.js
|
|
|
|
|
|
quite messy, some tests are missing, contains an experimental jasmine DI support)
|
|
The way we determine whether it's json is lame anyway. We need to change that.
We should probably check the content type header...
|
|
|
|
You can still use cache: true, which will use $http's default cache.
|
|
|
|
+ rename verifyExpectations to verifyNoOutstandingExpectation
|
|
|
|
|
|
We strip out both:
)]}',
)]}'
|
|
- $http.pendingRequests is now an array of pending requests
- each request (its future object) has public property configuration
|
|
$httpBackend mock allows:
- expecting (asserting) requests
- stubbing (responding without asserting)
Add empty $httpBackend service (currently just wrapper for $browser.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
|