Thanks Warren for your quick answer.
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
I get:
curl: (6) Could not resolve host: -d
curl: (3) [globbing] nested brace in column 141
{"fossil":"81d7d3f43ebd4e77095cfbacee7ebc9ae043a014760cde56d437dbd8b6a37c92","timestamp":1496792818,"resultCode":"FOSSIL-3002","resultText":"'name'
parameter is
missing.","command":"wiki/create","procTimeUs":0,"procTimeMs":0}%
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.
What I'm missing?
Cheers,
Offray
On 06/06/17 16:04, Warren Young wrote:
> On Jun 6, 2017, at 1:09 PM, Offray Vladimir Luna Cárdenas <[email protected]>
> wrote:
>> I don't know how the page name is supposed to be given in the URL.
> The document you point to says it’s supposed to be sent in the payload, not
> in the request URL:
>
> $ curl -H "Content-Type: application/json" \
> -d '{"authToken": "nunyabinness", \
> "payload": {"name": “foo", "content": "bar"} }' \
> http://localhost:8080/json/wiki/create
>
> Incidentally, I found a bug while working that incantation out: if you leave
> off the quotes around the property names, you get
>
> fossil: Fatal error: could not allocate response object
>
> on the console that is running the Fossil server instance. All errors that
> occur down the /json path should give a JSON reply, not kill off the forked
> child with a vague and highly nonhelpful error.
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users