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

  1. // Force ipv4 protocol
  2. $client->request('GET', '/foo', ['force_ip_resolve' => 'v4']);
  3. // Force ipv6 protocol
  4. $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 cURL and stream handlers.