Skip to Content
Author's profile photo Jerry Wang

How to send Batch request to backend with Chrome extension postman

There is a standard Gateway client tool ( transaction code /IWFND/GW_CLIENT ) which allows us to launch odata request without browser for testing purpose. And there is another approach which can achieve the same result without using SAPGUI, that is Chrome extension: postman.

/wp-content/uploads/2015/07/clipboard1_754359.png

For example, we are doing some test in Fiori application and we observe the following batch operation in Chrome network tab. We would like to do unit or performance testing on it with the help of postman.

/wp-content/uploads/2015/07/clipboard2_754360.png

How to create the batch operation in postman

Just copy the value you find in Chrome network tab from screenshot above to the postman based on the number.

/wp-content/uploads/2015/07/clipboard3_754391.png

now the request header part is done. We continue to copy all the text in request payload into clipboard. ( select all, ctrl + C )

/wp-content/uploads/2015/07/clipboard4_754392.png

Choose “raw” tab, then Ctrl + V all the payload text into the text area, and then click Send button. Unfortunately we get 403 error, due to the missing CSRF token.

/wp-content/uploads/2015/07/clipboard5_754393.png

How to get CSRF token

Just create another http request in postman, request method sets to GET, and http header x-csrf-token with value Fetch, send the request, and the token is available in response header.

/wp-content/uploads/2015/07/clipboard6_754394.png

Once done, paste this token into our previous batch request as http header value:

/wp-content/uploads/2015/07/clipboard7_754395.png

And send the batch request once again, this time it works:

/wp-content/uploads/2015/07/clipboard8_754396.png

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.