@shivamkumar2970 you are running this code on Bolt Cloud or on UBUNTU / Digital Ocean and what thing you are trying ti achieve with the https request. I mean to ask which program are you making?
i am running this code on bolt cloud
@shivamkumar2970 As of now, one can use the Bolt Cloud Dashboard’s IDE for only formatting a html or js file. In short it means that you can create & plot the graphs using this IDE through the js files and via the html files you can integrate the js file i.e. https://cloud.boltiot.com/static/js/boltCommands.js . It means that you can run the GPIO, UART and Utility commands via the cloud which are already defined in the js file provided by the Bolt Team.
They have advised us to use python code using the Virtual Box (Ubuntu OS) or Digital Ocean. As python offers a great number of third party libraries in order to integrate the language with other platforms which are present.
So in order to handle the server side requests and responses,python gives access to a library named requests. The requests library does all the manipulations for the web and server communication.
Because of the fact that Cloud IDE at the moment doesn’t have a support for python language that is why you can’t use the https in the IDE. You can run Python code through the help of Virtual Box and then import the requests library package to do the manipulations in http header.
I hope I have answered your query. Moreover, in the snippet I can see that you have only written single word, if you want me to rectify your code please do share the whole code.
If I have solved your quey then do close the query
Always welcome, buddy