Python Forum
Python Requests - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python Requests (/thread-29517.html)



Python Requests - Aussie - Sep-07-2020

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


RE: Python Requests - ndc85430 - Sep-07-2020

(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.


RE: Python Requests - Aussie - Dec-23-2020

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,