mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
#839 getRemoteResource 에서 연결 설정을 수정할 수 있도록 처리
This commit is contained in:
parent
b85b7b18e0
commit
66a2440daa
1 changed files with 10 additions and 1 deletions
|
|
@ -515,7 +515,7 @@ class FileHandler
|
|||
* @param string $post_data Request arguments array for POST method
|
||||
* @return string If success, the content of the target file. Otherwise: none
|
||||
*/
|
||||
function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array())
|
||||
function getRemoteResource($url, $body = null, $timeout = 3, $method = 'GET', $content_type = null, $headers = array(), $cookies = array(), $post_data = array(), $request_config = array())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -533,6 +533,15 @@ class FileHandler
|
|||
else
|
||||
{
|
||||
$oRequest = new HTTP_Request($url);
|
||||
|
||||
if(count($request_config) && method_exists($oRequest, 'setConfig'))
|
||||
{
|
||||
foreach($request_config as $key=>$val)
|
||||
{
|
||||
$oRequest->setConfig($key, $val);
|
||||
}
|
||||
}
|
||||
|
||||
if(count($headers) > 0)
|
||||
{
|
||||
foreach($headers as $key => $val)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue