But in general it would be more flexible to have some general way of doing this. For example, a callback function that accepts a mutable request entity (or builder). Hypothetically, this allows people to create an invalid request - but in this case it is already their responsibility if such an API is used.
This issue comes from https://github.com/fussybeaver/bollard/issues/395#issuecomment-2245054968
It would be nice to be able to customize request to docker. There is a need to at least configure the headers for the
testcontainers
crate: https://github.com/testcontainers/testcontainers-rs/issues/576But in general it would be more flexible to have some general way of doing this. For example, a callback function that accepts a mutable request entity (or builder). Hypothetically, this allows people to create an invalid request - but in this case it is already their responsibility if such an API is used.