`requests.post` data argument is used to send that in the **body** request, not as json header. The json argument can be a dictionary and doesn't need to be converted to string.
This is some python code to use GNUnet via the REST API.
Note: You need to have a running GNUnet installation on your machine with REST API for it to work. Or in the network, it is a REST API.
gnunet.py: The file to import. example.py Running examples for all functions with many comments. just run "python3 example.py", no worries ;)