avbot_rpc: remove copied code from avhttp