Alternatif yang digunakan saat gRPC tidak tersedia:
REST. Anda tidak
perlu menginstal ekstensi PHP apa pun dan ini didasarkan pada HTTP/1.1.
Jika Anda lebih suka menentukan jenis transpor sendiri, bukan mengandalkan
aturan default yang dijelaskan di atas, Anda dapat menetapkan properti transport di
bagian CONNECTION dalam
file
google_ads_php.ini:
[CONNECTION]
; Optional transport settings.
; By default, "grpc" is used if available otherwise "rest".
transport = "grpc"
Atau, Anda dapat mengonfigurasi setelan transpor secara terprogram seperti
semua setelan lainnya:
$googleAdsClient = (new GoogleAdsClientBuilder())
...
->withTransport('grpc')
->build();
[null,null,["Terakhir diperbarui pada 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."]]],[]]