Releases: joostvunderink/angular-jsonrpc-client
Releases · joostvunderink/angular-jsonrpc-client
Add support for progress monitoring
- Added documentation and example to monitor the progress of an outgoing JSON-RPC call.
Fixed handling of unexpected $http result
Bugfix: certain errors with $http usage now result in a rejected promise instead of an exception.
Another "fix the version" release.
- Updated version in
package.jsonandbower.json. - Unfortunately, github doesn't warn about older versions in those files when you're making a release.
- Making releases by hand seem to be error-prone; are there any tools for that?
Added support for cancelling requests
- There is now a third way to call
jsonrpc.request(): with a single object as argument.- This object must contain the keys
serverName,methodNameandmethodArgs. - An optional key is
config. These values are passed directly into the$httpobject.
- This object must contain the keys
- This can be used for example to cancel requests.
- Added an example to cancel a request.
- Added cancelling requests to the documentation.
Version fixing release
This release has no functional changes. In release 0.4.0, bower.json had not been updated and was still at 0.3.1. This has been fixed in this release.
Added support for request batches
- It is now possible to use the Batch feature as described in the JSON-RPC spec.
- You create a batch with
var batch = jsonrpc.batch(). - You add requests with
batch.add(request).then(handler). - You send the batch with
batch.send().
- You create a batch with
- Added documentation, unit tests and an example.
- Thanks to GerritK for most of the work of this feature!
Added way to set headers at run-time
- Added new method
jsonrpc.setHeaders(serverName, headers)to set headers at runtime. - These headers are added on top of the extra headers from the configuration phase.
- These headers will overwrite, if present, headers with the same name from the configuration phase.
- Also cleaned up and refactored the
request()function.
Error data is now accessible in a slightly easier way
- When handling an error, the error data is now also available via
error.data.
Added AngularJS dependency 1.4
- Updated AngularJS dependency from (1.3.15 to 1.4.0) to (1.3.x up to
2.0.0). - In practice this means that the service can now easily be used with
AngularJS 1.4.
Custom HTTP header support
- Added support for
headersin configuration.- Headers can be different for each backend.
- Added example to show how it works.
- Improved test suite significantly.
- Added tests for new
headersargument. - Made sure that overwriting the
Content-Typeheader does not
happen. - Added more tests for configuration.
- Start using
shouldlibrary in test suite.
- Added tests for new