HTTP Delete with Body not working | Community
Skip to main content
January 17, 2024
Solved

HTTP Delete with Body not working

  • January 17, 2024
  • 1 reply
  • 1066 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Parvesh_Parmar

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

1 reply

Parvesh_Parmar
Community Advisor
Community Advisor
January 19, 2024

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

 

 

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

Parvesh Parmar – Adobe Community Advisor https://www.linkedin.com/in/parvesh-parmar/
February 27, 2024

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?

Parvesh_Parmar
Community Advisor
Parvesh_ParmarCommunity AdvisorAccepted solution
Community Advisor
February 28, 2024

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

Parvesh Parmar – Adobe Community Advisor https://www.linkedin.com/in/parvesh-parmar/