function HTTP_Request::setURL in Flickr API 5
Sets the URL to be requested
@access public
Parameters
string The url to be requested:
1 call to HTTP_Request::setURL()
- HTTP_Request::HTTP_Request in phpFlickr/
PEAR/ HTTP/ Request.php - Constructor
File
- phpFlickr/
PEAR/ HTTP/ Request.php, line 399
Class
- HTTP_Request
- Class for performing HTTP requests
Code
function setURL($url) {
$this->_url =& new Net_URL($url, $this->_useBrackets);
if (!empty($this->_url->user) || !empty($this->_url->pass)) {
$this
->setBasicAuth($this->_url->user, $this->_url->pass);
}
if (HTTP_REQUEST_HTTP_VER_1_1 == $this->_http) {
$this
->addHeader('Host', $this
->_generateHostHeader());
}
// set '/' instead of empty path rather than check later (see bug #8662)
if (empty($this->_url->path)) {
$this->_url->path = '/';
}
}