Question
REST Int.- How to upload a sample Request body for DELETE Method without changing the API
Hello,
We are trying to integrate with a REST Service, we need to call a DELETE Method which takes a list of Parameters in Request Body.
We have a sample request, which we are trying to upload through Wizard, so that wizard will create required rules for request structure. But, there is no option to upload sample request for DELETE method, unlike we have fro POST method. Please suggest how it could be achieved.
Currently we are using the external API that we don´t need to change.
We are working on 7.2 , seen something similar but is there any update to that for resolving the above issue.
Reference
Re: REST Int.- How to upload a sample Request for DELETE Method?
***Updated by Moderator: Marissa to add SR Exists group tag***
I'm not positive, but I do not believe 7.2 has changed in this regard.
Some background : the community is torn on this, whether it is RESTful or not. Here is a pertinent post - http://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request.
Evidently, Pega once had this feature but then the underlying API we used or converted to (Apache HTTP Components) did not support message body on DELETE. There is a workaround (as referenced in the related article you tagged SA-23619). It would involve extending HttpEntityEnclosingRequestBase class. Here is a link discussing that. https://daweini.wordpress.com/2013/12/20/apache-httpclient-send-entity-body-in-a-http-delete-request/
Finally, there is a Pega workaround where you setup a GET and "use the generated data model for DELETE method by manually changing the mapping configuration on the Connect REST rule".