企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# REST 服务提供商代码MathService ```php /** * Http Add */ public function http_add() { $one = $this->http_input->get('one'); $two = $this->http_input->get('two'); $this->http_output->end($one+$two); } ``` 服务调用放代码 ```php public function http_testREST() { $rest = ConsulServices::getInstance()->getRESTService('MathService', $this->context); $rest->setQuery(['one' => 1, 'two' => 2]); $reuslt = yield $rest->add(); $this->http_output->end($reuslt['body']); } ```