HTTP_Client::setDefaultHeader()

HTTP_Client::setDefaultHeader() – Sets default header(s) for HTTP requests

Synopsis

require_once 'HTTP/Client.php';

void HTTP_Client::setDefaultHeader ( mixed $name , string $value = null )

Description

These are standard HTTP headers that will be sent by all created HTTP_Request objects.

Parameter

mixed $name

header name or array ('header name' => 'header value')

string $value

header value if $name is not an array

Throws

throws no exceptions thrown

Note

This function can not be called statically.

Clears object's internal properties (Previous) Sets the maximum number of redirects that will be processed. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.