Skip to Content

Hello All,

In my ongoing learning I came across enough learning blogs on how to create OData services , debug it  consume it etc. However at some point I was stuck in the end about how do I default my web service response to json format?

It might be very common concept for most of other learners but still could be handy for any new learner who need it as quick reference.

We have multiple ways to test/execute our OData web services. Most common platforms are through the click on ‘SAP Gateway client’ button or the Postman.

Note: Creation of Odata service are not included as we have various good material for the same.

 

Execution via:

Gateway client: T-code SEGW

 

Click on SAP Gateway Client button. It will navigate to the hub system.

At the left top side above HTTP request click on Add header button and add the below two header parameters as mentioned below with value as application/json

Content-Type for input in case we have post methods

 

Accept-> For the default response format

 

Click on execute button

Sample Get Method

 

Sample Post response

 

Execution via Postman service

Below header parameters would be need for the json format response.

 

Hope this helps and saves time for fellow learners.

Regards,

Atul

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply