SAP Business One Service Layer – return-no-content option
Have you heard about the “return-no-content” option available in oData?
If you haven’t please check the following link for more details:
OData Version 3.0 Core Protocol – the Best Way to REST
Now that you know about the option let me tell you that SAP Business One Service Layer supports this option since SAP Business One, version for SAP HANA 9.1 PL10.
What is the advantage of this option? Performances!! You will not get the full Added object in the response body but an empty body what reduces the response message size and improves performances.
Take advantage of it by simply setting Prefer header with value return-no-content on Add operations and Service Layer will then return an empty body as response. You will be able to get the key of the newly added object by looking at the Location information in the header of the response message.
If you haven’t used SAP Business One Service Layer for your custom developments in top of SAP Business One version for SAP HANA yet or even don’t know what I’m talking about please take some minutes to go over the existing blogs and documentation talking about it at our SAP Business One, version for SAP HANA Extensibility topics page.
Hope you will find this option useful! I do!!!