WP_REST_Request::remove_header( string $key )

In this article

Removes all values for a header.

Parameters

$keystringrequired
Header name.

Source

public function remove_header( $key ) {
	$key = $this->canonicalize_header_name( $key );
	unset( $this->headers[ $key ] );
}

Changelog

VersionDescription
4.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.