nncli

NextCloud Notes Command Line Interface
git clone git://git.danielmoch.com/nncli.git
Log | Files | Refs | LICENSE

commit e827a387726dd2dc0d684676dd9d22614abca6aa
parent 3c6f785dd7335c107e3edc35a7c068d239e85efa
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Mon, 27 Aug 2018 21:36:37 -0400

Use json in put/post requests per API documentation

Diffstat:
Mnnotes_cli/nextcloud_note.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/nnotes_cli/nextcloud_note.py b/nnotes_cli/nextcloud_note.py @@ -142,10 +142,11 @@ def update_note(self, note): try: logging.debug('NOTE: ' + str(note)) if url != self.url: - res = requests.put(url, auth=(self.username, self.password), data=note) + res = requests.put(url, auth=(self.username, + self.password), json=note) else: res = requests.post(url, auth=(self.username, - self.password), data=note) + self.password), json=note) note = res.json() res.raise_for_status() logging.debug('NOTE (from response): ' + str(res.json()))