예제 #1
0
 /**
  *
  * @dataProvider providerTestSendRequest
  * @group live
  */
 public function testSendRequest($url, $postData, $postJson, $assertResponse)
 {
     $statusCode = HttpRequest::sendRequest($url, $postData, $postJson);
     if ($assertResponse) {
         $this->assertInternalType('string', $statusCode);
     } else {
         $this->assertFalse($statusCode);
     }
 }
예제 #2
0
파일: SEOstats.php 프로젝트: dzc34/SEOstats
 /**
  * @return HTML string
  */
 protected static function _getPage($url)
 {
     $url = self::getUrl($url);
     if (self::getLastLoadedUrl() == $url) {
         return self::getLastLoadedHtml();
     }
     $html = Helper\HttpRequest::sendRequest($url);
     if ($html) {
         self::$_lastLoadedUrl = $url;
         self::_setHtml($html);
         return $html;
     } else {
         self::noDataDefaultValue();
     }
 }