Issues with sending large data with httpPost

I need to post a 52k xml data and I keep getting a weird error when trying to send that data with the httpPost() API. I am able to send smaller sizes of data just fine with the API just that when its huge the API fails.
From a device handler I call a parent App method to do the httpPost, when I do that the App stops logging and the device handler shows this error at the point of the call to the parent:

java.lang.reflect.UndeclaredThrowableException @line 175 (poll)

I do have a try catch block around the call to httpPost but it is not catching anything. If I comment out the call to httpPost I don’t see this error. Again: the same code works fine when using a smaller body.
BTW, the public POST API I need to hit cannot be modified.
Any tips on getting around this problem is appreciated.

If you DM me your username, dth name and a time when this occured, I can take a look at our logs to see if there is anything I can see. Can’t promise I’ll find something but it’s worth a shot.

Edit: Also have you tried calling this API via postman or a different tool to verify its not an issue with the API?

1 Like

Sent you the information you requested, also I did verify the target API with curl and the same payload and it works. Thanks for looking into this issue, let me know if there is any workaround.