On Jun 6, 2017, at 5:51 PM, Offray Vladimir Luna Cárdenas <off...@riseup.net> wrote: > > When I try something similar with: > > curl -H "Content-Type: application/json" \ -d '{"authToken": > "mytoken", \ > "payload": {"name": “foo", "content": "bar"}}' > http://localhost:8081/json/wiki/create
You’re missing a backslash between the JSON string and the URL. The backslashes are largely for formatting reasons, so that I could continue a long command onto multiple lines in the email. I recommend that you just type this as a single command, not copy-paste it as shown in the email. Also, my mailer curled one of the quotes around “foo”, which you’ve copied into your command, and that will break the JSON parser. It needs to be an ASCII double quote. (I try to catch it when this happens, but sometimes my mailer is smarter than I am.) > but if I do: > > curl http://localhost:8081/json/wiki/timeline > > I get: > > {"fossil":"81d7d3f43ebd4e77095cfbacee7ebc9ae043a014760cde56d437dbd8b6a37c92","timestamp":1496792951,"command":"wiki/timeline","procTimeUs":3333,"procTimeMs":3,"payload":{"limit":20,"timeline":[]}}% > > > So, wiki is properly served via JSON API from the local host. That’s a much simpler call. It doesn’t require any permissions, and it’s a GET call, not a POST call. That test proves little other than that you have a working JSON API in your local Fossil instance. _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users