Cleanup cookiejar
This commit is contained in:
parent
4be51e17d5
commit
89c095a127
1 changed files with 3 additions and 0 deletions
|
|
@ -26,6 +26,9 @@ function call($method, $url, $data = false) {
|
|||
// in case you are using php-api-auth:
|
||||
$csrf = call('POST','http://localhost/blog.php/', 'username=admin&password=admin');
|
||||
$response = call('GET','http://localhost/blog.php/posts?include=categories,tags,comments&filter=id,eq,1&csrf='. trim($csrf));
|
||||
|
||||
unlink($cookiejar);
|
||||
|
||||
$jsonObject = json_decode($response,true);
|
||||
|
||||
$jsonObject = php_crud_api_transform($jsonObject);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue