api: moved http-client specific transfer-encoding selection to request() method