# httpClient instance creation advice

**URL:** <https://forum.inductiveautomation.com/t/httpclient-instance-creation-advice/90568>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [May 17, 2024, 5:07pm UTC](https://forum.inductiveautomation.com/t/httpclient-instance-creation-advice/90568 "2024-05-17T17:07:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 17, 2024, 5:15pm UTC](https://forum.inductiveautomation.com/t/httpclient-instance-creation-advice/90568/2 "2024-05-17T17:15:29Z")

</div>

Instantiate it at the top level of the script library and use that one instance for all of your work.

> [@httpClient. java.io.IOException: Unable to establish loopback connection](https://forum.inductiveautomation.com/t/httpclient-java-io-ioexception-unable-to-establish-loopback-connection/53876/3):
>
> Also, as a generally good practice, you should instantiate your `httpClient()` instance _outside_ of the function

---

_[View the full topic](https://forum.inductiveautomation.com/t/httpclient-instance-creation-advice/90568)._
