Closed calavera closed 2 months ago
We also need to check if signal is aborted when we use the request. Similarly the same signal should be passed to response and handle aborted value as well
@richarddavison can you point me to where that's handled? I cannot find the right place to add those checks.
We also need to check if signal is aborted when we use the request. Similarly the same signal should be passed to response and handle aborted value as well
@richarddavison can you point me to where that's handled? I cannot find the right place to add those checks.
First place would be to here: https://github.com/awslabs/llrt/blob/a3a9fa73700006c46ebe3171635ffb48a70d440c/src/http/fetch.rs#L175
And then when response is read: https://github.com/awslabs/llrt/blob/a3a9fa73700006c46ebe3171635ffb48a70d440c/src/http/response.rs#L133
I see two solutions:
Issue # (if available)
Fixes https://github.com/awslabs/llrt/issues/182
Description of changes
Allow to pass an AbortSignal as an option to a request. Ensure that only AbortSignal types are allowed.
Checklist
tests/unit
and/or in Rust for my feature if neededmake fix
to format JS and apply Clippy auto fixesmake check
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.