require_once 'vendor/autoload.php';
Unirest\Request::auth('xxx', 'xxx');
$headers = array( 'Accept' => 'application/json', 'Content-Type' => 'application/json' );
$body = '
{
"id": "1234",
"title": "new apge",
"type": "page",
"space": {
"key": "page"
},
"status": "current",
"ancestors": [
{
"id": "page"
}
],
"body": {
"view": {
"value": "22",
"representation": "view"
},
"export_view": {
"value": "23",
"representation": "view"
},
"styled_view": {
"value": "24",
"representation": "view"
},
"storage": {
"value": "25",
"representation": "view"
},
"editor2": {
"value": "26",
"representation": "view"
},
"anonymous_export_view": {
"value": "27",
"representation": "view"
}
}
}
';
$response = Unirest\Request::post( 'http://localhost:8090/confluence/rest/api/content', $headers, $body );
var_dump($response);
above is my code and i am getting header of the confluence in return in broken html format
I want actual response which mentioned in confluence documentation so that I can implement further operations.
reply me as soon as possible
TIA