if (is_array($options['cookies'
])) { $options['cookies'
] =
new Jar($options['cookies'
]);
} elseif (empty($options['cookies'
])) { $options['cookies'
] =
new Jar();
} if ($options['cookies'
] !== false
) { $options['cookies'
]->
register($options['hooks'
]);
} if ($options['idn'
] !== false
) { $iri =
new Iri($url);
$iri->host = IdnaEncoder::
encode($iri->ihost
);
$url =
$iri->uri;
} // Massage the type to ensure we support it.
$type =
strtoupper($type);
if (!
isset($options['data_format'
])) { if (in_array($type,
[self::HEAD, self::GET, self::DELETE
], true
)) { $options['data_format'
] = 'query';
} else {