"""Code showing how to create a tiddler in tiddly wiki using python. I was not able to get this working without the "X-Requested-With" header.""" import requests TIDDLY_WIKI_URL = 'https://localhost:8080' TIDDLY_WIKI_REQUEST_HEADERS = { # this "X-Requested-With" header is the key to making these requests work 'X-Requested-With': 'TiddlyWiki', 'Content-Type': 'application/json' } tiddler_data = { 'title': 'foo', 'text': 'bar' } url_path = f'{TIDDLY_WIKI_URL}/recipes/default/tiddlers/{tiddler_title}' response = requests.put(url, data=tiddler_data, headers=TIDDLY_WIKI_REQUEST_HEADERS) print(response)