-
-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web: support adding new transactions via JSON PUT (#316)
A single transaction can be added by PUT to /add. (I read that PUT, not POST, should be used to create; perhaps the web add form should also use PUT ?) As with the web form, the `add` capability is required (and enabled by default). Here's how to test with curl: $ curl -s http://127.0.0.1:5000/add -X PUT -H 'Content-Type: application/json' --data-binary @in.json; echo New readJsonFile/writeJsonFile helpers in Hledger.Web.Json are handy for generating test data. Eg: >>> writeJsonFile "in.json" (head $ jtxns samplejournal)
- Loading branch information
1 parent
b46212a
commit 2dc716c
Showing
4 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters