Arduino HTTP Error Code -1 When Using Static IP

If you can just copy and paste the full error message, it would be so much easier to troubleshoot.

When the code is too long and complex, what I would do is separating it to sections and trying to find the bug. This is how to assign a static IP to your ESP8266. Use this code, forget all the sensor data and try sending a simple POST request. If it works, then add another piece of that long code and try it. You'll eventually catch the error. Also recheck the wiring and connections. Most of the time, bad connections cause these kind of errors.

Good Luck!