如何在Oracle中使用与php“ stream_context_create”中类似的代码,我想将内容推送到Web视图中以获得下一步的结果。
function http_request_post_login($username,$password){
$loginURL = 'http://mydomain/user/login';
$json = '{"username":"' . $username . '","password":"'. $password . '"}';
$options = array(
'http' => array(
'header' => "Content-type: application/json",
'method' => 'POST',
'content' => $json,
),
);
$context = stream_context_create( $options );
$result = file_get_contents( $loginURL, false, $context );
return $result;
}