I am using hellobar popup on my website. Hello bar popup has a contact form with email field. A user comes to site and provide its email to subscribe. Then hello bar sends that information of user to the owner of using email tools and webhook. I have created a webhook URL which triggers nicely when a user submits the form but it never sent any data. I am supposed to have JSON response but it is always empty.
Asked
Active
Viewed 107 times
0
-
I think you want `getHTTPRequestData().content` , not method. – TRose Jul 13 '20 at 17:53
-
@TRose Yes i have also used the getHTTPRequestData().content but it always shows empty.. Thats why i used getHTTPRequestData().method to ensure that type of Request the URL is accepting. Content is empty – user9094763 Jul 14 '20 at 15:20
-
- Have you tried dumping the entire object? And this may be a dumb question, but have you tried dumping `#FORM#` as well? – TRose Jul 14 '20 at 15:27
-
@TRose Yes, I have dumped the whole object getHTTPRequestData() and also #Form# but all remains empty... HelloBar support says that they return data in json format but it am getting empty response. I have also tested with POSTMAN and my script is working fine. – user9094763 Jul 14 '20 at 15:38
-
Hm... have you tried `deserializeJSON()` instead of `ToString()` ? Beyond this I'm not sure what could be wrong if Postman's testing is telling you everything else is valid. – TRose Jul 14 '20 at 15:46
-
@TRose Yes i have tried everything you can think of. I have also tested in PHP but i am sure that there is something not working properly on their (Hellobar API) end. And thanks alot for suggesting possible solutions. I am in-touch with the Support from two days and they also don't know what's happening wrong. Lets hope for the best. :) – user9094763 Jul 14 '20 at 16:01
-
1What version of Coldfusion/Lucee/Railo are you using? And is `getHTTPRequestData()` being called earlier in the request, perhaps via `application.cfc` or one of those custom tags earlier in your page? As there are/were known scenarios where `getHTTPRequestData().content` may return empty despite body content being posted, including but not limited to: https://luceeserver.atlassian.net/browse/LDEV-1119 and https://www.bennadel.com/blog/2824-gethttprequestdata-may-break-your-request-in-coldfusion-but-gethttprequestdata-false-may-not.htm – Sev Roberts Jul 15 '20 at 07:33
-
Agreed. Test it with a minimal page first to eliminate interference from other code. – SOS Jul 15 '20 at 09:28