Relative Content

Tag Archive for pythonwordpressapi

WordPress REST API doesnt work properly with python

I was making a python script that uploads local pdf files to my wordpress website, using the wordpress api, but for some reason, the post method with media endpoint just gives me a lot of random data including other media files instead of uploading my pdf.

Why headers for make a POST REQUEST does not work but with Auth does it work?? (WORDPRESS)

I´m trying to send a database (SQLite) as a JSON file and publish it in a Wordpress (Also i want to edited rows and column, etc) but when i do this doing a simple post with request library in python throws me this error when i use this line of code:
header = {"user": username, "password": password}
response = requests.post(url, headers=header, json=data)