On Fri, Sep 9, 2011 at 11:18 AM, [email protected]
<[email protected]>wrote:

> Please consider that when using cgi a complete REST over http style
> interface is not supported: cgi defines only http GET and POST
>
> DELETE and PUT are not in the cgi spec and handled differently by different
> httpd's.


fossil server is just a wrapper around fossil cgi, so that would also apply
to server mode.

Personally, i use CGI mode 95% of the time (server mode only locally, and
only occasionally), so CGI is my primary concern here. While there is
arguably little use for JSON in CLI mode, i'm trying to keep it all
structured so that i can use the same code/commands in both CLI and
CGI/server modes (mainly because testing in CLI mode is easier). e.g.:

http://fossil.wanderinghorse.net/repos/fossil-sgb/index.cgi/json/stat

is equivalent to:

stephan@tiny:~/cvs/fossil/fossil-sgb$ ./fossil json stat
{
"fossil":"20ff808f9809541d2eca6c49a17d5cbd16e1b93f",
"timestamp":1315587046,
"payload":{
"projectName":"Fossil",
"repositorySize":21855232,
"blobCount":13620,
"deltaCount":9361,
"uncompressedArtifactSize":589418504,
"averageArtifactSize":43282,
"maxArtifactSize":4620758,
"compressionRatio":"26:1",
"checkinCount":3153,
"fileCount":456,
"wikiPageCount":23,
"ticketCount":940,
"ageDays":1512,
"ageYears":4.139744,
"projectCode":"CE59BB9F186226D80E49D1FA2DB29F935CCA0333",
"serverCode":"2cacd7c3ff350a4cede890b1be494dc3e1cf1b39",
"compiler":"gcc-4.4.5",
"sqlite":{
"version":"2011-09-04 01:27:00 [6b657ae750] (3.7.8)",
"pageCount":21343,
"pageSize":1024,
"freeList":778,
"encoding":"UTF-8",
"journalMode":"delete"
}
}
}



-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to