Thread: XHR request
View Single Post
Old 12-09-2020, 05:20 AM   #1
lktr45
Zealot
lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'lktr45 knows the difference between 'who' and 'whom'
 
Posts: 135
Karma: 10280
Join Date: Oct 2016
Device: none
XHR request

Hello,

I'm trying to develop a personal plugin to retrieve a data from a website.

After analyzing the XHR requests, I managed to get a result using import requests on PyCharm.

Code:
import requests
header = {..., ...}
data = {..., ...}
url = "..."
response = requests.post (url, headers = header, json = data)
res_json = response.json ()
But import requests do not seem to be implemented in Calibre.
What equivalent instructions should I use in Calibre to achieve this result?

Sorry for my English. I add that my knowledge of Python is basic.

Thank you for your answers
lktr45 is offline   Reply With Quote