Home/Support/Support Forum/How to use HTTPS in ConnectPort X5 with digi_httplib?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

How to use HTTPS in ConnectPort X5 with digi_httplib?

0 votes
I am trying to make HTTPS request with following code:

import digi_httplib as httplib
connection = httplib.HTTPSConnection("%s:%d"%(host,port))
connection.request(requestType, path, data, headers)
response = connection.getresponse()

It works fine for HTTP, but for HTTPS this gives error: "sslerror: (8, 'EOF occurred in violation of protocol')"

Is this right way for making HTTPS request in X5 or is there another way?

Best regards,

Juha
asked Dec 22, 2016 in Python by juha.autioniemi New to the Community (23 points)

Please log in or register to answer this question.

2 Answers

0 votes
X5 has been end of lifed for years!

Can you use URLLIB?

Can you run a help('modules') on the device and show what you have access to?
answered Dec 22, 2016 by NicholasWilson Veteran of the Digi Community (969 points)
0 votes
Yes, I am aware that X5 is obsolete, but being obsolete doesnt make it useless :) We still have plenty of them in use and they are still working fine.

And yes, I think I can use or try to use urllib or urllib2.

I just wondered why I cant get digi_httplib to work. This is the library delivered with devtools 2.3 and seems like it is used in idigi_libraries to make HTTPS connection to device cloud.

I´ll check those modules later, when I access to X5 again.

Juha
answered Dec 22, 2016 by juha.autioniemi New to the Community (23 points)
...