Expand my Community achievements bar.

Join us for Adobe Campaign Community Q&A Coffee Break on Thursday, March 7th at 8am PT with Eric Perrin, Gael Mouello, Chakravarthy Kalva, Bruce Swann and Sandra Hausmann.

HTTP Delete with Body not working

Avatar

Level 1

Http API Call Delete with body is stripping body before it reaching the endpoint. Is there a way to send the request. I have seen option to use fetch library but please advise if there is any native support in javascript

3 Replies

Avatar

Community Advisor

Hello @satyendardu ,


Based on my exploration of the Adobe Campaign documentation, it appears that HTTP DELETE requests might not work seamlessly with the out-of-the-box `HttpClientRequest` class. You can find more details about this class in the Adobe Campaign documentation

 

https://experienceleague.adobe.com/developer/campaign-api/api/c-HttpClientRequest.html

 

Parvesh_Parmar_0-1705690044030.png

 

Furthermore, the Fetch method does not seem to be supported in Adobe Campaign JS activities. I attempted to execute it, but encountered an error during the process.

 

In light of these limitations, my suggestion would be to design the delete function on your server-side API. You can initiate an HTTP request to your server, passing the necessary values, and implement the delete logic within your API. This approach can help overcome the constraints posed by the Adobe Campaign environment.


Kr,

Parvesh

Avatar

Level 1

Thanks for your reply. However, I am using cURL and executing URL with execCommand(url) via java script. However, its spitting lot of logs and delaying the call as we have nearly 50000 records or more. Also do you have any explanation why Adobe drops body in delete operation?

Avatar

Community Advisor

Hello @satyendardu 

 

While using JS and execCommand for each record might work, it can be time-consuming for large datasets like 50,000 records.

For such cases, exporting the records to a file format suitable for your deletion application is generally a much more efficient approach.

 

Have you considered contacting Adobe support about this specific scenario? They may have additional recommendations or alternative solutions tailored to your needs.

 

Best regards,

Parvesh