Answer the question
In order to leave comments, you need to log in
Restangular + PHP how to accept data on the server?
This is how I send:
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:
=====================
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question