# system.net.httpClient POST method

**URL:** <https://forum.inductiveautomation.com/t/system-net-httpclient-post-method/57167>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [March 14, 2022, 4:44pm UTC](https://forum.inductiveautomation.com/t/system-net-httpclient-post-method/57167 "2022-03-14T16:44:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![martinel3746](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@martinel3746](https://forum.inductiveautomation.com/u/martinel3746)\
**Post date:** [March 14, 2022, 4:51pm UTC](https://forum.inductiveautomation.com/t/system-net-httpclient-post-method/57167/3 "2022-03-14T16:51:27Z")

</div>

We have an API service that would never respond to httpPost so we import the urllib and urllib2 and use those functions for posting to that particular API service.  
One thing that we found necessary, after running for a while, is that we needed to explicitly .close() the request to prevent overrunning the max connections.  
.close() is hardly documented and some say it is not necessary  
Here’s a snip from our code:

```auto
	try:
		apiRequest = urllib2.Request(endPoint, data, header)
		apiResponse	= urllib2.urlopen(apiRequest)
		qctResponse	= apiResponse.read()
		apiResponse.close() # close the connection JIRA Issue: QCT-1678

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/system-net-httpclient-post-method/57167)._
