✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.223
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/cloudflare-20260907214319//api-client.php
<?php

namespace Yoast\WP\SEO\AI_HTTP_Request\Infrastructure;

use WPSEO_Utils;
use Yoast\WP\SEO\AI_HTTP_Request\Domain\Exceptions\WP_Request_Exception;

/**
 * Class API_Client
 * Handles the API requests to the AI Generator API.
 *
 * @makePublic
 */
class API_Client implements API_Client_Interface {

	/**
	 * The base URL for the API.
	 *
	 * @var string
	 */
	private $base_url = 'https://ai.yoa.st/api/v1';

	/**
	 * Performs a request to the API.
	 *
	 * @param string        $action_path The action path for the request.
	 * @param array<string> $body        The body of the request.
	 * @param array<string> $headers     The headers for the request.
	 * @param bool          $is_post     Whether the request is a POST request.
	 *
	 * @return array<int|string|array<string>> The response from the API.
	 *
	 * @throws WP_Request_Exception When the wp_remote_post() returns an error.
	 */
	public function perform_request( string $action_path, $body, $headers, bool $is_post ): array {
		// Our API expects JSON.
		// The request times out after 30 seconds.
		$headers   = \array_merge( $headers, [ 'Content-Type' => 'application/json' ] );
		$arguments = [
			'timeout' => $this->get_request_timeout(),
			'headers' => $headers,
		];

		if ( $is_post ) {
			// phpcs:ignore Yoast.Yoast.JsonEncodeAlternative.Found -- Reason: We don't want the debug/pretty possibility.
			$arguments['body'] = WPSEO_Utils::format_json_encode( $body );
		}

		/**
		 * Filter: 'Yoast\WP\SEO\ai_api_url' - Replaces the default URL for the AI API with a custom one.
		 *
		 * @internal
		 *
		 * @param string $url The default URL for the AI API.
		 */
		$url      = \apply_filters( 'Yoast\WP\SEO\ai_api_url', $this->base_url );
		$response = ( $is_post ) ? \wp_remote_post( $url . $action_path, $arguments ) : \wp_remote_get( $url . $action_path, $arguments );

		if ( \is_wp_error( $response ) ) {
			// phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- false positive.
			throw new WP_Request_Exception( $response->get_error_message() );
		}

		return $response;
	}

	/**
	 * Gets the timeout of the requests in seconds.
	 *
	 * @return int The timeout of the suggestion requests in seconds.
	 */
	public function get_request_timeout(): int {
		/**
		 * Filter: 'Yoast\WP\SEO\ai_suggestions_timeout' - Replaces the default timeout with a custom one, for testing purposes.
		 *
		 * @since 22.7
		 * @internal
		 *
		 * @param int $timeout The default timeout in seconds.
		 */
		return (int) \apply_filters( 'Yoast\WP\SEO\ai_suggestions_timeout', 60 );
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
23 Sep 2026 4.33 AM
docteuh / users
0777
2021-20260911084835
--
12 Sep 2026 8.19 AM
docteuh / users
0755
Utils
--
12 Sep 2026 12.47 AM
docteuh / users
0755
admin
--
12 Sep 2026 12.47 AM
docteuh / users
0755
apiclient-services
--
18 Sep 2026 7.36 PM
docteuh / users
0755
assets
--
16 Sep 2026 8.05 PM
docteuh / users
0755
auth
--
7 Sep 2026 11.43 PM
docteuh / users
0755
cache
--
13 Sep 2026 1.48 PM
docteuh / users
0755
config
--
10 Sep 2026 6.53 AM
docteuh / users
0755
domain
--
10 Sep 2026 2.46 AM
docteuh / users
0755
endpoints
--
9 Sep 2026 4.27 AM
docteuh / users
0755
infrastructure
--
17 Sep 2026 5.31 PM
docteuh / users
0755
javascript
--
8 Sep 2026 10.21 PM
docteuh / users
0755
lib
--
7 Sep 2026 11.43 PM
docteuh / users
0755
licensing
--
11 Sep 2026 3.27 PM
docteuh / users
0755
log
--
16 Sep 2026 2.05 AM
docteuh / users
0755
media
--
9 Sep 2026 7.06 AM
docteuh / users
0755
mod
--
13 Sep 2026 12.02 PM
docteuh / users
0755
nextjs
--
18 Sep 2026 8.53 AM
docteuh / users
0755
patterns
--
7 Sep 2026 4.27 PM
docteuh / users
0755
schema-aggregator
--
10 Sep 2026 3.31 PM
docteuh / users
0755
site
--
7 Sep 2026 11.43 PM
docteuh / users
0755
styles
--
7 Sep 2026 11.43 PM
docteuh / users
0755
user-interface
--
13 Sep 2026 10.48 AM
docteuh / users
0755
views
--
12 Sep 2026 12.47 AM
docteuh / users
0755
wordpress
--
7 Sep 2026 11.43 PM
docteuh / users
0755
api-client-interface-20260831024249.php
0.962 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
api-client-interface.php
0.962 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
api-client.php
2.509 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
help-scout-beacon.js
4.826 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829050506-20260830003632-20260830003701-20260830003856-20260831163243.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829050506-20260830004210-20260830004247-20260830005923-20260830013342.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260909113823.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
index.php
1.995 KB
19 Jun 2024 11.07 AM
docteuh / users
0644
loadable-interface.php
0.279 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
widgets-form.php
19.136 KB
21 May 2026 2.34 PM
docteuh / users
0644
xmlrpc.php
1.223 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF