<commit_before><?php
$cli = new swoole_http_client('127.0.0.1', 9501);
//post request
//$cli->setData(http_build_query(['a'=>123,'b'=>"哈哈"]));
$cli->setHeaders(['User-Agent' => "swoole"]);

$cli->get('/index.php', function ($cli)
{<commit_msg>update async http client example.<commit_after><?php
$cli = new swoole_http_client('127.0.0.1', 9501);
//post request
//$cli->setData(http_build_query(['a'=>123,'b'=>"哈哈"]));
//$cli->set(['timeout' => -1]);
//$cli->setHeaders(['Host' => 'www.baidu.com']);
//$cli->set(['http_proxy_host' => '127.0.0.1', 'http_proxy_port' => 8888,]);

$cli->setHeaders(['User-Agent' => "swoole"]);

$cli->get('/index.php', function ($cli)
{
{'fraction_non_alphanumeric': 0.2962406015037594, 'fraction_numerical': 0.055639097744360905, 'mean_word_length': 6.239130434782608, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4986545', 'n_tokens_mistral': 285, 'n_tokens_neox': 271, 'n_words': 38}