Please describe the feature you’d like to see added.
Right now we can only import wallets by filename. This means you can only execute that rpc if you are executing it from the system where the bitcoin node is running. But it could be that you are sending the rpc request from outside the node. In that case you don’t have access to the file system. So it would be handy to allow passing the content of a wallet dump file instead and also allowing dumping the content not in a file but in the rpc result.
It might be a good idea to check for other cases where the same is being done.