Page MenuHomePhabricator

How to use VirtualRESTServiceClient::runMulti with named requests
Open, MediumPublic

Description

the documentation of VirtualRESTServiceClient::runMulti reads

@return array $reqs Map of corresponding response values with the same keys/order

However, I did not manage to get that working in
https://gerrit.wikimedia.org/r/#/c/282916/3/MathRestbaseInterface.php
Is there something special that needs to be taken care of?
While looking at the code, I was wondering about VirtualRESTServiceClient::run
If runMulti would return an associate array

	public function run( array $req ) {
		return $this->runMulti( [ $req ] )[0];
	}

element [0] might be undefined.