CentraSite Documentation : Runtime Governance with CentraSite : Important Considerations when Configuring REST or XML Virtual Services : Changing the HTTP Method of a REST or XML Request : The Implications of Changing HTTP Methods
The Implications of Changing HTTP Methods
When changing this incoming HTTP method...
To...
Note that...
GET
POST
*The Content-Type of the changed request is sent as application/xml or application/json, and the charset is UTF-8.
*Depending on the structure of the native service, be aware that the native service might not be expecting the same payload structure that is being sent. In this case, you would need to transform the request message into the format required by the native service before Mediator sends the requests to the native service. For more information, see Sample XSLT Transformation for GET-to-POST or GET-to-PUT.
GET
PUT
Identical to GET-to-POST, except that Mediator changes the request's HTTP method from GET to PUT.
GET
DELETE
No comment.
POST
GET
*Mediator will translate the POSTed request elements into query string parameters, in a root element.
Note:  
An incoming POST or PUT request cannot be translated into a GET or DELETE if the request has nested elements. For example:
(this is correct)
<person>
<lastName>Smith</lastName>
</person>
(this is incorrect)
<person>
<name>
<last>Smith</last>
</name>
</person>
*If you want to send additional parameters as part of the request URL, you can transform this payload. To do this, you can use an XSLT file or a webMethods IS service call to add parameters before the request is sent to the native service. For more information about adding parameters to REST virtual services, see Working with REST-based APIs in CentraSite.
POST
DELETE
Identical to POST-to-GET, except that Mediator changes the request's HTTP method from POST to DELETE.
POST
PUT
The Content-Type of the changed request is sent as application/xml or application/json, and the charset is UTF-8.
PUT
GET
Identical to POST-to-GET, except that Mediator changes the request's HTTP method from PUT to GET.
PUT
POST
The Content-Type of the changed request is sent as application/xml or application/json, and the charset is UTF-8.
PUT
DELETE
Identical to POST-to-DELETE, except that Mediator changes the request's HTTP method from PUT to DELETE.
DELETE
GET
No comment.
DELETE
POST
Identical to GET-to-POST, except that Mediator changes the request's HTTP method from DELETE to POST.
DELETE
PUT
Identical to GET-to-PUT, except that Mediator changes the request's HTTP method from DELETE to PUT.
GET, POST, PUT or DELETE
Use Context Variable
GET or DELETE
POST or PUT
Note that the query parameters will be picked off the URL and stored as top-level elements when the message is sent to the native service. The query parameters are ignored on the endpoint URL and lost when we POST to the native provider (that is, don't change the protocol method).
PATCH
POST or PUT
Note that the query parameters will be picked off the URL and stored as top-level elements when the message is sent to the native service. The query parameters are ignored on the endpoint URL and lost when we POST to the native provider (that is, don't change the protocol method).
Copyright © 2005-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback