Description
I the following tests, I use the file
Hello world!
If trying to put a content,
curl \ --verbose \ --user Admin:admin \ --request PUT \ --header 'Content-type: text/plain' \ --data-binary "@file.txt" \ "http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Sandbox/pages/TestPlain"
result is
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <page xmlns="http://www.xwiki.org"> <link href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Sandbox" rel="http://www.xwiki.org/rel/space"/> <link href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Sandbox/pages/TestPlain/history" rel="http://www.xwiki.org/rel/history"/> <link href="http://localhost:8080/xwiki/rest/syntaxes" rel="http://www.xwiki.org/rel/syntaxes"/> <link href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/Sandbox/pages/TestPlain" rel="self"/> <link href="http://localhost:8080/xwiki/rest/wikis/xwiki/classes/Sandbox.TestPlain" rel="http://www.xwiki.org/rel/class"/> <id>xwiki:Sandbox.TestPlain</id> <fullName>Sandbox.TestPlain</fullName> <wiki>xwiki</wiki> <space>Sandbox</space> <name>TestPlain</name> <title>TestPlain</title> <parent/> <parentId/> <version>4.1</version> <author>XWiki.Admin</author> <xwikiRelativeUrl>http://localhost:8080/xwiki/bin/view/Sandbox/TestPlain</xwikiRelativeUrl> <xwikiAbsoluteUrl>http://localhost:8080/xwiki/bin/view/Sandbox/TestPlain</xwikiAbsoluteUrl> <translations/> <syntax>xwiki/2.1</syntax> <language/> <majorVersion>4</majorVersion> <minorVersion>1</minorVersion> <created>2015-11-09T10:34:09+01:00</created> <creator>XWiki.Admin</creator> <modified>2015-11-09T11:07:53+01:00</modified> <modifier>XWiki.Admin</modifier> <comment/> <content>Helloworld!</content> </page>