netflie/whatsapp-cloud-api

Setting a proxy

Closed this issue · 1 comments

Hello,

I need to set the proxy on each API request, how can I access the request so I can set the proxy header?

like this
https://docs.guzzlephp.org/en/stable/request-options.html#proxy

Thank you.

Hi @KhawlahElshah

When you create an instance of the class you can pass through the constructor an array of options. One of those options is client_handler where you can pass your own implementation of a Guzzle client.

The client must implement the ClientHandler interface https://github.com/netflie/whatsapp-cloud-api/blob/main/src/Http/ClientHandler.php

Thanks.