Python Forum

Full Version: Python Requests
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I have started looking at requests in Python.
It must be possible to add both an ssl and authentication right?
If correct, how.

Also, you can write payloads to class's right.

Thanks, Smile
(Sep-07-2020, 10:46 AM)Aussie Wrote: [ -> ]It must be possible to add both an ssl and authentication right?

If the server supports HTTPS, then you just use "https" as the scheme in the URL. Did you check the docs, particularly the Advanced usage section?

Quote:Also, you can write payloads to class's right.

I don't understand what this means.
Hi,
I have managed to get Auth working. However, using the SSL certificate is proving difficult.
Any ideas?
--------------------------------------------------------------------------
import requests

x = requests.get('https://xxxxx.xxxxxxx.xxxxxxxx.internal:8443/rest/xxxx/retrieveRequestDetails?RequestNo=000002572354', headers={"Authorization": "Basic %s" % base64_bytes}, verify ='C:/Users/Administrator/Desktop/xxxxxxx.cer')

print(x.text)

Thanks,