Requests::flatten()
最后更新于:2021-11-25 23:07:01
Requests::flatten( array$array)Convert a key => value array to a ‘key: value’ array for headers
参数
- $array
-
(array) (Required) Dictionary of header values
响应
(array) List of headers
源文件
文件: gc-includes/class-requests.php
public static function flatten($array) {
$return = array();
foreach ($array as $key => $value) {
$return[] = sprintf('%s: %s', $key, $value);
}
return $return;
}