← All changes
|
src/services/suggestions-api/endpoints/class-suggestions-api-base-endpoint.php
+4
-3
3.19.2
→
3.24.2
View file →
| @@ -17,10 +17,8 @@ | ||
| 17 | 17 | * The base class for the suggestions API endpoints. |
| 18 | 18 | * |
| 19 | 19 | * @since 3.17.0 |
| 20 | 20 | * |
| 21 | - * @link https://content-suggestions-api.parsely.net/prod/docs | |
| 22 | - * | |
| 23 | 21 | * @phpstan-import-type WP_HTTP_Response from Base_Service_Endpoint |
| 24 | 22 | * @phpstan-import-type WP_HTTP_Request_Args from Base_Service_Endpoint |
| 25 | 23 | */ |
| 26 | 24 | abstract class Suggestions_API_Base_Endpoint extends Base_Service_Endpoint { |
| @@ -45,9 +43,12 @@ | ||
| 45 | 43 | */ |
| 46 | 44 | protected function get_request_options( string $method ): array { |
| 47 | 45 | $options = array( |
| 48 | 46 | 'method' => $method, |
| 49 | - 'headers' => array( 'Content-Type' => 'application/json; charset=utf-8' ), | |
| 47 | + 'headers' => array( | |
| 48 | + 'Content-Type' => 'application/json; charset=utf-8', | |
| 49 | + 'X-INTERNAL-SERVICE' => 'content-helper', | |
| 50 | + ), | |
| 50 | 51 | 'data_format' => 'body', |
| 51 | 52 | 'timeout' => 90, //phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout |
| 52 | 53 | 'body' => '{}', |
| 53 | 54 | ); |