| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
WP AI Client: WP_AI_Client_HTTP_Client class
| File Size: | 226 lines (7 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
WP_AI_Client_HTTP_Client:: (7 methods):
__construct()
sendRequest()
sendRequestWithOptions()
prepare_wp_args()
prepare_headers()
prepare_body()
create_psr_response()
Class: WP_AI_Client_HTTP_Client - X-Ref
PSR-18 HTTP Client adapter using WordPress HTTP API.| __construct( ResponseFactoryInterface $response_factory, StreamFactoryInterface $stream_factory ) X-Ref |
| Constructor. param: ResponseFactoryInterface $response_factory PSR-17 Response factory. param: StreamFactoryInterface $stream_factory PSR-17 Stream factory. |
| sendRequest( RequestInterface $request ) X-Ref |
| Sends a PSR-7 request and returns a PSR-7 response. return: ResponseInterface The PSR-7 response. param: RequestInterface $request The PSR-7 request. |
| sendRequestWithOptions( RequestInterface $request, RequestOptions $options ) X-Ref |
| Sends a PSR-7 request with transport options and returns a PSR-7 response. return: ResponseInterface The PSR-7 response. param: RequestInterface $request The PSR-7 request. param: RequestOptions $options Transport options for the request. |
| prepare_wp_args( RequestInterface $request, ?RequestOptions $options = null ) X-Ref |
| Prepares WordPress HTTP API arguments from a PSR-7 request. return: array<string, mixed> WordPress HTTP API arguments. param: RequestInterface $request The PSR-7 request. param: RequestOptions|null $options Optional transport options for the request. |
| prepare_headers( RequestInterface $request ) X-Ref |
| Prepares headers for WordPress HTTP API. return: array<string, string> Headers array for WordPress HTTP API. param: RequestInterface $request The PSR-7 request. |
| prepare_body( RequestInterface $request ) X-Ref |
| Prepares request body for WordPress HTTP API. return: string|null The request body. param: RequestInterface $request The PSR-7 request. |
| create_psr_response( array $wp_response ) X-Ref |
| Creates a PSR-7 response from a WordPress HTTP response. return: ResponseInterface PSR-7 response. param: array<string, mixed> $wp_response WordPress HTTP API response array. |
| Generated : Sat Jun 13 09:38:55 2026 | Cross-referenced by PHPXref |