# HttpClient Get Error

**URL:** <https://forum.inductiveautomation.com/t/httpclient-get-error/97126>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [October 11, 2024, 7:42am UTC](https://forum.inductiveautomation.com/t/httpclient-get-error/97126 "2024-10-11T07:42:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasi\_Rai](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@Sasi\_Rai](https://forum.inductiveautomation.com/u/Sasi_Rai)\
**Post date:** [October 11, 2024, 7:42am UTC](https://forum.inductiveautomation.com/t/httpclient-get-error/97126/1 "2024-10-11T07:42:10Z")

</div>

Hi All,

I am having issues with HttpClient.Get().

I have been getting some values from an API. The following script worked consistently for the last 9 months:

```python
def getData(accessToken):
	headers={"Authorization":accessToken}
	url=system.tag.getTagValue('[Humerd]LoadFlex/Credentials/ForecastURL')
	client=system.net.httpClient()
	response = client.get(url=url, headers=headers)

```

Some changes were made on the API and now the same script doesn't work.

I get a huge list of errors. These ones stood out:

java.io.IOException: java.io.IOException: Unable to GET https://\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/forecastdata

Caused by: javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake

On my test laptop the same script works fine. What's going on here? Has anyone come across this?

I tried setting the http client to http\_1\_1 as well. Didn't work. It seems the API doesn't like something in our request and shuts down the connection.

I can provide my full script if necessary.

Thank you all.

Best Regards,  
Sasi

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 11, 2024, 12:02pm UTC](https://forum.inductiveautomation.com/t/httpclient-get-error/97126/2 "2024-10-11T12:02:04Z")

</div>

You'll need to see the logs from the other end to figure this out. "Remote host terminated the handshake" means it isn't Ignition's fault. That it used to work, and now doesn't, means the API changes on the other end are responsible, and you need detailed information about those changes to figure it out.

You may also need to use wireshark to see what is happening "on the wire" during the handshake.

---

<div class="post-metadata">

**Author:** ![Sasi\_Rai](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@Sasi\_Rai](https://forum.inductiveautomation.com/u/Sasi_Rai)\
**Post date:** [October 11, 2024, 12:52pm UTC](https://forum.inductiveautomation.com/t/httpclient-get-error/97126/3 "2024-10-11T12:52:41Z")

</div>

Thanks pturmel.

Thats exactly what I am thinking.

However, from my test laptop, the exact same script is able to get data from the API. I even upgraded the site Ignition to 8.1.35 to match that of my laptop, still same result. Could whatever httpclient.get() relies on be different between the site pc and my laptop? I don't know. This is whats confusing me.

This maybe a good incentive to actually learn wireshark!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 11, 2024, 1:35pm UTC](https://forum.inductiveautomation.com/t/httpclient-get-error/97126/4 "2024-10-11T13:35:04Z")

</div>

When different behaviors appear in two locations, same code, I suspect firewalls.
