var auth= {
user: 'username',
pass: 'password',
}
Restangular.all('api').post(auth);
$mytext="\n=====================\n";
$mytext .= "POST: \n";
foreach ($_POST as $key => $value) {
$mytext .= $key ." = ". $value ."\n";
}
$mytext .= "\n=====================\n";
$fp = fopen('log.txt', 'at');
fwrite($fp, $mytext);
fclose($fp);
=====================
POST:
=====================