feat: add ic-cdk-http-kit, a toolkit for testing http outcalls on the IC
Description
This change adds ic-cdk-http-kit, a simple toolkit for constructing and testing HTTP Outcalls on the Internet Computer.
It streamlines unit testing of HTTP Outcalls and provides user-friendly utilities.
The crate simulates the http_request function from ic_cdk by retrieving mock responses, checking the maximum allowed size, and applying a transformation function if specified, optionally with a delay to simulate latency.
README.md is generated automatically from the crate documentation.
How Has This Been Tested?
ic-cdk-http-kit/run_all_tests.sh covers all the tests:
- crate documentation and README.md sync test
- crate-level cargo tests
- example canister cargo tests
- example canister end-to-end tests
Checklist:
- [x] The title of this PR complies with Conventional Commits.
- [ ] I have edited the CHANGELOG accordingly.
- [ ] I have made corresponding changes to the documentation.
A friendly ping to review this PR.
A friendly ping to review updates.
Hi all,
Just wanted to give a quick nudge on this PR. I've addressed all the previous comments, added some CI tests and it should be ready for another look. I understand it's not top of the list, but I believe it contributes into improving dev experience effort.
If there's anything else needed, please let me know.
Thank you so much for your time!