Thank you so much for the quick response. Unfortunately, that didn’t get rid of the error. Below is my script, and the error I’m receiving. Does this look right? The code works with 7.9.4, but not 8.0.3.
Traceback (most recent call last):
File “event:actionPerformed”, line 3, in
IOError: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Also, tooting my own horn, but if you upgrade to 8.0.6 you can use the new system.net.httpClient, which is a bit more powerful and generally gives you better error messages as well. The equivalent code snippet would be:
After talking with the vendor, I waited on a new version of the API before I kept working on this. I used your httpClient in this new code, but get an error 411 when I send the post. This appears to be an issue with Content-Length not being sent. However, if I try to include Content-Length in the headers, I get an error that Content-Length is protected. Any ideas. Below is the code I have.
The underlying Java HTTPClient only sends the Content-Length header if it’s 1: capable of determining it and 2: if it’s not 0. Unfortunately, that means you have to send some body to get the client to send a Content-Length header, which may end up causing a different error with your server…
for k, v in system.net.httpClient().post("https://httpbin.org/post", data="a").json.items():
print k, v
This post is pretty old. Go ahead and start a new topic where you explain the issue you're having, including your Ignition version and any other relevant details.