我使用workman做ws客戶端的時(shí)候,設(shè)置headers,設(shè)置Host能生效,設(shè)置HTTP_ACCEPT_ENCODING卻無效,
請(qǐng)教下是不能設(shè)置HTTP_ACCEPT_ENCODINGzh這個(gè)headers嗎?
?
應(yīng)該這樣用:
$ws_connection->onConnect = function($connection){
$connection->wsHttpHeader = array(
'Host' => 'something here',
'Accept-Encoding' => "something here",
);
};