摘要 |
Various embodiments of systems and methods for REST interface interaction with expectation management are described herein. A message request is received for accessing content of a resource. Further, a check is made to determine whether the message request includes a structure-expected in a header of the message request. Also, a check is made to determine whether the structure-expected matches with a structure of the resource if the message request includes the structure-expected. Furthermore, the message request is executed if the structure-expected matches with the resource structure. Then, a message response is returned with a structure-resulted in a header of the message response based on the execution of the message request. If the message request does not include the structure-expected, the message request is executed and the message response is returned with the structure-resulted based on the execution of the message request. |
主权项 |
1. A computer implemented method for providing a representational state transfer (REST) interface interaction with expectation management, the method comprising:
receiving a message request at an interface engine from a client system, requesting to perform an action on a resource at a server system, wherein the interface engine acts as an interface between the client system and the server system; determining at the interface engine whether the message request includes a structure-expected in a header of the message request, wherein the structure-expected comprises a first hash value computed using a first hash function based on the message request; upon determining that the message request includes the structure-expected, retrieving a structure of the resource from the server system to the interface engine; determining at the interface engine whether the structure-expected matches the retrieved structure of the resource; upon determining that the structure-expected matches the retrieved structure of the resource,
sending the message request for execution at the server system;receiving an executed execution of the message request at the interface engine; andcomputing at the interface engine a structure-resulted including a second hash value based on the received execution of the executed message request, wherein the second hash value is computed using a second hash function; upon determining that the structure-expected in the message request does not match with the retrieved structure of the resource, returning execution failure response with the structure-resulted; upon determining that the message request does not include a structure-expected,
sending the message request for execution at the server system;receiving an executed message request at the interface engine; andcomputing at the interface engine a structure-resulted including a third hash value based on the received executed message request, wherein the third hash value is computed using the second hash function; and returning, from the interface engine to the client system, a message response with the structure-resulted in a header of the message response based on the received executed execution of the message request. |