Sending empty json object to body of api

0
Hi, When consuming an api, how do I send an empty json in body of the POST request in ‘Call Rest API’?   Thanks
asked
5 answers
1

Your screenshots look very promising! What system is on the publishing side? Maybe that system requires you to send the Content-Type along with the empty JSON-message. So you could try this, by adding the header like shown below (second header):

 

answered
1

I believe if you don't add any body to your API call it sends an empty JSON or else you can send only empty braces like below

“{}”

answered
1

You can try enabling Send empty values in the Behaviour of the Export mapping.

answered
1

Did you try to create the empty JSON yourself?

So something like:

{				        
    "id":null,				
    "firstName": null,			
    "address": null,			
    "homeAddresses":null		
    "phoneNumbers": null		
}
{
    "address":{}
    "homeAddresses":[]
    "phoneNumbers":[]
}

Regards,

Ronald

 

answered
0

Can you try to have an export mapping that maps an entity (probably a dummy) with no attributes against a MD (or JSON) for the same entity with no attributes.

answered