/** * Call a remote method that takes a single argument and has a single output * * @param string $method The name of the method to call * @param $argument The argument to the method * @param callable $deserialize A function that deserializes the response * @param array $metadata A metadata map to send to the server * @return SimpleSurfaceActiveCall The active call object */ public function _simpleRequest($method, $argument, callable $deserialize, $metadata = array()) { list($actual_metadata, $timeout) = $this->_extract_timeout_from_metadata($metadata); $call = new UnaryCall($this->channel, $method, $deserialize, $timeout); $jwt_aud_uri = $this->_get_jwt_aud_uri($method); if (is_callable($this->update_metadata)) { $actual_metadata = call_user_func($this->update_metadata, $actual_metadata, $jwt_aud_uri); } $call->start($argument, $actual_metadata); return $call; }
/** * Call a remote method that takes a single argument and has a * single output. * * @param string $method The name of the method to call * @param $argument The argument to the method * @param callable $deserialize A function that deserializes the response * @param array $metadata A metadata map to send to the server * * @return SimpleSurfaceActiveCall The active call object */ public function _simpleRequest($method, $argument, $deserialize, $metadata = [], $options = []) { $call = new UnaryCall($this->channel, $method, $deserialize, $options); $jwt_aud_uri = $this->_get_jwt_aud_uri($method); if (is_callable($this->update_metadata)) { $metadata = call_user_func($this->update_metadata, $metadata, $jwt_aud_uri); } $metadata = $this->_validate_and_normalize_metadata($metadata); $call->start($argument, $metadata, $options); return $call; }
/** * Call a remote method that takes a single argument and has a single output * * @param string $method The name of the method to call * @param $argument The argument to the method * @param callable $deserialize A function that deserializes the response * @param array $metadata A metadata map to send to the server * @return SimpleSurfaceActiveCall The active call object */ public function _simpleRequest($method, $argument, callable $deserialize, $metadata = array()) { $call = new UnaryCall($this->channel, $method, $deserialize); $call->start($argument, $metadata); return $call; }