I am using RestSharp for creating pages. Page creation work great when the html body stay simple, without any (") double quotes characters.
This exemple work great for me:
request.AddParameter("application/json", "{\"type\": \"page\",\"title\": \"TEST\",\n " + AncestorString + " \"space\": {\"key\": \"" + ConfluenceSpaceKey + "\" }, \"body\": {\"storage\": {\"value\": \"<h2>Hello World</h2> \", \"representation\": \"storage\" } } }", ParameterType.RequestBody);
As soon I as need to add double quotes characters in the html body:
<h2 style =\"color: Tomato;\"> Hello World </h2>
I get this error:
{"statusCode": 500, "message": "", "reason": "Internal Server Error"}
This exemple don't work for me:
request.AddParameter("application/json", "{\"type\": \"page\",\"title\": \"TEST\",\n " + AncestorString + " \"space\": {\"key\": \"" + ConfluenceSpaceKey + "\" }, \"body\": {\"storage\": {\"value\": \"<h2 style =\"color: Tomato;\"> Hello World </h2> \", \"representation\": \"storage\" } } }", ParameterType.RequestBody);
Any ideas?
Thx!!