Ejemplo n.º 1
0
 function createHttpRequestService()
 {
     $config = Environment::getConfig('httpRequest');
     // params can be taken from config or command line if needed
     $uri = new UriScript();
     $uri->scheme = 'http';
     $uri->port = Uri::$defaultPorts['http'];
     $uri->host = $config->host;
     $uri->path = $config->path;
     //	    $uri->path = '/';
     $uri->canonicalize();
     $uri->path = String::fixEncoding($uri->path);
     $uri->scriptPath = '/';
     $req = new HttpRequest();
     $req->setUri($uri);
     return $req;
 }