f3-factory / fatfree-core

Fat-Free Framework core library
GNU General Public License v3.0
206 stars 89 forks source link

can not override accept-encoding header in lib/web.php #355

Closed m0x3 closed 2 years ago

m0x3 commented 2 years ago

I need NOT send gzip,deflate, cause it makes troubles on other side, but f3 always sends gzip,deflate.

ikkez commented 2 years ago

Yes I see it's not editable. We'll have a look to fix that. In the meantime you can try to switch the request engine and try it with socket or stream engine instead of curl:

$web = \Web::instance();
$web->engine('stream');
$web->request('https://domain.com');

These do accept the same $options array as curl.

ref.: https://github.com/bcosca/fatfree-core/blob/cdd878db018280369b643fce62f70e55044f9ac4/web.php#L362

ikkez commented 2 years ago

@m0x3 added option in latest commit. You can adjust the value with the encoding key in the $options array for request method.