WordPress at Your Fingertips
function is not described

Requests::flatten() public WP 1.0

Convert a key => value array to a 'key: value' array for headers

{} It's a method of the class: Requests{}

No Hooks.

Return

Array. List of headers

Usage

$result = Requests::flatten( $array );
$array(array) (required)
Dictionary of header values

Code of Requests::flatten() WP 5.8.2

public static function flatten($array) {
	$return = array();
	foreach ($array as $key => $value) {
		$return[] = sprintf('%s: %s', $key, $value);
	}
	return $return;
}