Skip to Content
0

DOES THE XSODATA SERVICE POST REQUEST RETURN ONLY XML FORMAT???

Dec 06, 2016 at 02:07 AM

76

avatar image
Former Member

Hello Experts,

When I perform a successful POST request using Odata services (*.xsodata) it returns only XML format? Is it possible to perform a POST request and get a JSON as a result?

I know that when you are performing a GET request you can just add the parameter ?$format=json to get a JSON as a result but it did not work for POSTS requests.

regards,

Filipe

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Florian Pfeffer
Dec 06, 2016 at 06:01 AM
0

Hello Filipe,

in the POST request you have to set the "Accept" header to "application/json" (or "application/json; charset=utf-8") to get a JSON back as response.

Regards,
Florian

Share
10 |10000 characters needed characters left characters exceeded