force_ip_resolve
- Summary
- Set to "v4" if you want the HTTP handlers to use only ipv4 protocol or "v6" for ipv6 protocol.
- Types
- string
- Default
- null
- Constant
GuzzleHttp\RequestOptions::FORCE_IP_RESOLVE
- // Force ipv4 protocol
- $client->request('GET', '/foo', ['force_ip_resolve' => 'v4']);
- // Force ipv6 protocol
- $client->request('GET', '/foo', ['force_ip_resolve' => 'v6']);
Note
This setting must be supported by the HTTP handler used to send a request.force_ip_resolve
is currently only supported by the built-in cURLand stream handlers.