提交 da1222b4 编写于 作者: W wangguibao

Demo: HTTP interface via Python and PHP

上级 b3113293
......@@ -34,6 +34,7 @@ function http_post($url, $data) {
curl_close($ch);
return $result;
}
//key value 数组,如果多,后面用逗号分开key =>value ,key1 => value1 ,....
echo http_post('http://127.0.0.1:8010/BuiltinTestEchoService/inference', array("a" => 1, "b" => 0.5));
?>
......@@ -100,8 +100,6 @@ $labels = array();
read_data($argv[1], $samples, $labels);
echo count($samples) . "\n";
// key value 数组,如果多,后面用逗号分开key =>value ,key1 => value1 ,....
$ch = &http_connect('http://127.0.0.1:8010/TextClassificationService/inference');
$count = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册