beta / bitrix-psr7
PSR-7 adapter for Bitrix
Installs: 1 418
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 1
Requires
- php: >=8.1
- guzzlehttp/psr7: ^2.0
Requires (Dev)
- squizlabs/php_codesniffer: ^3.6
- vimeo/psalm: ^4.20
README
Примеры использования:
/** * @var \Bitrix\Main\HttpRequest $orginalBitrixRequest * @var \Bitrix\Main\HttpResponse $originalBitrixResponse */ $request = new \BitrixPSR7\Request($orginalBitrixRequest); $request->getHeader('Content-type'); $request->getHeaderLine('Content-type'); $uri = $request->getUri(); $uri->getHost(); $uri->getPort(); $uri->getPath(); $response = new \BitrixPSR7\Response($originalBitrixResponse); $response->getHeader('Content-type'); $response->getHeaderLine('Content-type'); $response->getStatusCode(); $response->getBody();