# Error Sending Post Request

**URL:** <https://forum.inductiveautomation.com/t/error-sending-post-request/80525>\
**Category:** Ignition\
**Created:** [October 16, 2023, 12:11pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525 "2023-10-16T12:11:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![S\_ANIL\_KUMAR](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@S\_ANIL\_KUMAR](https://forum.inductiveautomation.com/u/S_ANIL_KUMAR)\
**Post date:** [October 16, 2023, 12:11pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/1 "2023-10-16T12:11:33Z")

</div>

Hi, I am trying to execute a post request( sending files using rest API). I see that when I execute the request from localhost it's giving me a status code of 200 where as when I execute the same code from another system's Localhost i am getting 502 bad gateway error. May I know what difference the two localhost gateway could have. They're of the same versions.  
I am using httplib module to perform the post request.

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:** [October 16, 2023, 12:14pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/2 "2023-10-16T12:14:04Z")

</div>

It's probably something unique to your network, like a misconfigured proxy or firewall or some other network appliance in the middle. You'll probably need to work with your IT department.

---

<div class="post-metadata">

**Author:** ![S\_ANIL\_KUMAR](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@S\_ANIL\_KUMAR](https://forum.inductiveautomation.com/u/S_ANIL_KUMAR)\
**Post date:** [October 16, 2023, 12:21pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/3 "2023-10-16T12:21:39Z")

</div>

I've both the ignition gateway installed in my personal laptop and official laptop.

---

<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 16, 2023, 12:30pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/4 "2023-10-16T12:30:13Z")

</div>

> [@Kevin.Herron](#):
>
> You'll probably need to work with your IT department.

This. Something is blocking the traffic on one machine. Typically an IT-enforced firewall or security proxy.

---

<div class="post-metadata">

**Author:** ![S\_ANIL\_KUMAR](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@S\_ANIL\_KUMAR](https://forum.inductiveautomation.com/u/S_ANIL_KUMAR)\
**Post date:** [October 16, 2023, 5:19pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/5 "2023-10-16T17:19:24Z")

</div>

Hi @pturmel , I see that when i am sending a file below 50kb ,the request gives a success status 200 , where as if it's above 50kb it's giving a 502.

---

<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 16, 2023, 5:20pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/6 "2023-10-16T17:20:55Z")

</div>

Then something along the way, or the target server, doesn't like posts that large. 🤷‍♂️

You need to be looking at logging on the other end of this connection.

---

<div class="post-metadata">

**Author:** ![S\_ANIL\_KUMAR](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@S\_ANIL\_KUMAR](https://forum.inductiveautomation.com/u/S_ANIL_KUMAR)\
**Post date:** [October 16, 2023, 5:22pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/7 "2023-10-16T17:22:45Z")

</div>

I assumed it to be the target server's issue, but then when i try it from another laptop where I've the same version of ignition installed. I am able to send the same file from there and it's 200 again. 🥲

---

<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 16, 2023, 5:39pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/8 "2023-10-16T17:39:30Z")

</div>

> [@pturmel](#):
>
> Then something along the way

You really need to talk to your IT group.

---

<div class="post-metadata">

**Author:** ![S\_ANIL\_KUMAR](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@S\_ANIL\_KUMAR](https://forum.inductiveautomation.com/u/S_ANIL_KUMAR)\
**Post date:** [October 16, 2023, 5:42pm UTC](https://forum.inductiveautomation.com/t/error-sending-post-request/80525/9 "2023-10-16T17:42:13Z")

</div>

okay @pturmel thank you
