Help with glowfi.sh https client reading response from server

First I want to thank @michaelT and @jersey99 for their development of this library. I have it working…sort of.

One thing I could not figure out on my own was reading back a server response to get and post requests. So I built locally and modified the httpsClientConnection function to accept a char array(buffer) so it could populate that with the response from the server. It works fine but I know this probably is not right. What is the proper way to read the response from the server in the user application code?

My second issue is the Photon is hitting a hard fault after several successful connections with the server. I am still trying to isolate the cause of this fault but wondered if anyone else had similar issues(Several successful transactions, then a hard fault).

I am currently attempting to isolate the issue and simplify the code as much as possible to pin point the cause of the fault. If I knew how to properly read the response from the server with this library(unaltered) I think that would be a big step in the right direction.

Anyone?

I couldn’t get this library to work reliably when I tried it a year or two ago. The second or third call failed. Have you tried using TlsTcpClient instead? There’s also another TLS library but I can’t remember what it’s called at the moment.

1 Like

I actually have it working reliably at this point. My one problem is if the connection to the server fails for any reason the next time I try to connect I get a hard fault and the Photon reboots. Normally I wouldn’t worry about that too much but it kills the serial connection and I have an application connected over the USB to the Photon communicating so it has to reset the connection which is a pain.

I am wondering what needs to be done when httpsClientConnection fails to properly handle it so the next connection will not cause a hard fault. If I knew that I would be perfectly fine with this library.

If I can’t figure this out I might take a look at TlsTcpClient. Kind of hate to at this point with the time I have invested so far and the fact that my deadline is quickly approaching.

Hi @timx

Ok, so I’m not getting anywhere on the HTTPS client library from glow.sh and no one is jumping up to answer the question as to why the Photon hard faults if a POST fails so I thought I’d give the TlsTcpClient library a try as you suggested. I have been allotted a little extra time by the customer to give this library a try.

Please forgive my ignorance as to exactly how HTTPS works but will I need to get the certificate for the server I am trying to send my POST requests to and manually paste that in the application code? That’s what it looks like but I have not done this(HTTPS) in the past so I wanted to make sure. The HTTPS library appeared to take care of this for you but it looks like this library does not.

Any help you can provide is greatly appreciated.