# HTTP Post gives odd error when tried in a gateway context

**URL:** <https://forum.inductiveautomation.com/t/http-post-gives-odd-error-when-tried-in-a-gateway-context/34758>\
**Category:** Ignition\
**Created:** [May 14, 2020, 6:44pm UTC](https://forum.inductiveautomation.com/t/http-post-gives-odd-error-when-tried-in-a-gateway-context/34758 "2020-05-14T18:44:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [May 14, 2020, 6:44pm UTC](https://forum.inductiveautomation.com/t/http-post-gives-odd-error-when-tried-in-a-gateway-context/34758/1 "2020-05-14T18:44:49Z")

</div>

I have a URL, a JSON string, and a desire to post that JSON string to that URL with MIME type application/JSON. So I do this:

```auto
system.net.httpPost(url, "application/json",system.util.jsonEncode(payload))

```

where payload is the python dictionary, and url is the post URL. I’ve tried this in the script console, a version of it in Postman, and both work fine. However, it doesn’t work when I put it in a gateway timer script. I get an error like this

```auto
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last): File "", line 41, in IOError: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

```

where line 41 is the httpPost() line above.  
Googling hasn’t really gotten me anywhere; anyone know whats going on here? Also, I’m on 7.9 (with no 8.0 in sight just yet) so I can’t use the fancy new httpClient() ☹

Edit: if it matters, it is an HTTPS url. I don’t believe there are any authentication requirements; I posted just fine without any on the script console & Postman.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 14, 2020, 7:06pm UTC](https://forum.inductiveautomation.com/t/http-post-gives-odd-error-when-tried-in-a-gateway-context/34758/2 "2020-05-14T19:06:29Z")

</div>

Are you using different versions of Java for the Ignition Gateway and the Designer?

---

<div class="post-metadata">

**Author:** ![mrogers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mrogers/32/4110_2.png) [@mrogers](https://forum.inductiveautomation.com/u/mrogers)\
**Post date:** [May 14, 2020, 7:13pm UTC](https://forum.inductiveautomation.com/t/http-post-gives-odd-error-when-tried-in-a-gateway-context/34758/3 "2020-05-14T19:13:10Z")

</div>

On the gateway, java is 1.8.0\_121-b13  
On my client/designer, java is 1.8.0\_221-b11

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 14, 2020, 7:23pm UTC](https://forum.inductiveautomation.com/t/http-post-gives-odd-error-when-tried-in-a-gateway-context/34758/4 "2020-05-14T19:23:58Z")

</div>

Hmm. Well, it might be worth trying to update the gateway to the latest version of Java 8.
