Hi bubblers, I need some quick reference/help.
I have a bubble api webhook that receives a JSON post from another server notifying me of payments.
Their JSON message is in the standard JSON format as shown below.
{
“header”:{
“sig”:“2kOUGU034ewgyWSetc=”,
“timestamp”:“2019-08-20T08:31:47.1938912Z”
},
“body”:{
“payerbanknum”:“ABCDEF”,
“payerbankname”:“XYZ”,
“billerbanknum”:“ETC”,
“billerbankname”:“XXX BANK”,
“currencycode”:“MYR”,
“amount”:400,
“extdata”:null
}
}
What I noticed is that this message is not properly recognised by my bubble webhook when I received their test message.
I therefore tested this JSON message using Postman (Chrome) and found that the following is interpreted by Bubble during initialization detection:
{
“body”: "{\n “payerbanknum”:“ABCDEF”,\n “payerbankname”:“XYZ”,\n “billerbanknum”:“ETC”,\n "billerbankname …
if I inserted “Content-Type”:“application/json” in the header, the problem disappears and the following is correctly detected:
{
“body”: {
“payerbanknum”: “ABCDEF”,
“payerbankname”: “XYZ”,
“billerbanknum”: “ETC”,
It therefore implies that Content-Type must be added to the JSON Post for bubble to recognise the message properly.
As I cannot tell the sender to change their JSON message and to include “Content-Type” in the header, is there any way I can get this to work in my webhook?