# Alternative to urllib2 or system.net.httpPost?

**URL:** <https://forum.inductiveautomation.com/t/alternative-to-urllib2-or-system-net-httppost/16878>\
**Category:** Ignition\
**Created:** [February 5, 2018, 8:32pm UTC](https://forum.inductiveautomation.com/t/alternative-to-urllib2-or-system-net-httppost/16878 "2018-02-05T20:32:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kstofcho](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@Kstofcho](https://forum.inductiveautomation.com/u/Kstofcho)\
**Post date:** [February 5, 2018, 8:32pm UTC](https://forum.inductiveautomation.com/t/alternative-to-urllib2-or-system-net-httppost/16878/1 "2018-02-05T20:32:07Z")

</div>

Are there any alternatives to urllib2 or system.net.httpPost available in Ignition? I am working with an API that has a handful of post functions that return a 403 forbidden error using either of these methods but execute fine using Python’s requests library. I don’t believe there is a way to use Python requests in Ignition so are there any other alternative libraries/methods I could try? Thanks!

---

<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:** [February 5, 2018, 8:36pm UTC](https://forum.inductiveautomation.com/t/alternative-to-urllib2-or-system-net-httppost/16878/2 "2018-02-05T20:36:02Z")

</div>

You can use [HttpURLConnection](https://docs.oracle.com/javase/7/docs/api/java/net/HttpURLConnection.html) directly.

Have you looked at Wireshark to see what’s different between your requests made between the different methods?

---

<div class="post-metadata">

**Author:** ![Kstofcho](https://avatars.discourse-cdn.com/v4/letter/k/a9a28c/32.png) [@Kstofcho](https://forum.inductiveautomation.com/u/Kstofcho)\
**Post date:** [February 8, 2018, 2:17am UTC](https://forum.inductiveautomation.com/t/alternative-to-urllib2-or-system-net-httppost/16878/3 "2018-02-08T02:17:56Z")

</div>

I get the same forbidden error with the HttpURLConnection. I have not used Wireshark before. Sounds helpful. I will look into it more. Thanks!
