Há dois tipos de transporte que podem ser usados ao enviar solicitações para a
API. Nossa biblioteca de cliente seleciona a melhor opção entre as seguintes:
Alternativa usada quando o gRPC não está disponível:
REST. Ele
não exige a instalação de nenhuma extensão do PHP e é baseado no HTTP/1.1.
Se você preferir especificar o tipo de transporte em vez de depender das
regras padrão descritas acima, defina a propriedade transport na
seção CONNECTION do arquivo
google_ads_php.ini:
[CONNECTION]
; Optional transport settings.
; By default, "grpc" is used if available otherwise "rest".
transport = "grpc"
Como alternativa, você pode configurar a configuração de transporte de forma programática, como
todas as outras:
$googleAdsClient = (new GoogleAdsClientBuilder())
...
->withTransport('grpc')
->build();
[null,null,["Última atualização 2024-11-24 UTC."],[[["The Google Ads API client library supports two transport types: gRPC (preferred) and REST (fallback)."],["gRPC offers better performance but requires the gRPC PHP extension, while REST is based on HTTP/1.1 and doesn't require any specific extension."],["You can manually specify your preferred transport type through the `google_ads_php.ini` configuration file or programmatically within your code."],["The gRPC version utilized by the library is usually managed through dependencies, primarily `google/gax`, and occasionally directly within the library's own `composer.json` for optimization or compatibility."]]],[]]