You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gpt4free/unfinished/cocalc
Daniele Polizzi 96eab8ed1d
Update __init__.py
I changed the import statement from request import Session to import requests because in the original the Session class is the only class imported from the request library. In this case, it is more efficient to import the whole library with import requests and use requests.Session() instead of Session() and added various code comments

Instead of having a separate dictionary, I created a headers dictionary and used the update() method to update the session header.

The create() function returns the results of a request made to a website as a JSON dictionary using the .json() method. However, you don't need to import the json library explicitly because the json() function is a method of the Response object returned by session.post(). In other words, the .json() method does the json decoding for us, so we don't need to use the json module's json()
2 years ago
..
__init__.py Update __init__.py 2 years ago
cocalc_test.py code refractoring 2 years ago