Requests_Cookie::format_for_header() WordPress Method

The Requests_Cookie::format_for_header() method is used to format a cookie header for use in an HTTP request. This method takes a key and value, and returns a string in the format "key=value". This string can then be used as the value for the "Cookie" header in an HTTP request.

Requests_Cookie::format_for_header() #

Format a cookie for a Cookie header


Description

This is used when sending cookies to a server.


Top ↑

Return

(string) Cookie formatted for Cookie header


Top ↑

Source

File: wp-includes/Requests/Cookie.php

	public function format_for_header() {
		return sprintf('%s=%s', $this->name, $this->value);
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.