You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by "anu238 ." <an...@gmail.com> on 2016/01/27 22:39:38 UTC

Difference in behavior when using $format

I am sorry I forgot to add subject line in my previous email.

All,
I am trying the sample service provided on the apache olingo website.
When I give the following request:
http://localhost:8080/DemoService/DemoService.svc/Products

I see that an element <a:link rel="edit" href="Products(2)"/> with results
but when I run
http://localhost:8080/DemoService/DemoService.svc/Products?$format=json
The json does not contain href . Can someone explain why this difference in
behavior?
Thanks a lot for your help in advance.
Best,
Anurag

Re: Difference in behavior when using $format

Posted by Ramesh Reddy <ra...@redhat.com>.
In atom the payload contains all the data, in json payload there are different levels, minimal, none, full. The default is minimal which does not contain the edit urls. 

Ramesh.. 

----- Original Message -----

> I am sorry I forgot to add subject line in my previous email.

> All,
> I am trying the sample service provided on the apache olingo website.
> When I give the following request:
> http://localhost:8080/DemoService/DemoService.svc/Products

> I see that an element <a:link rel =" edit " href =" Products(2) " /> with
> results but when I run
> http://localhost:8080/DemoService/DemoService.svc/Products?$format=json
> The json does not contain href . Can someone explain why this difference in
> behavior?
> Thanks a lot for your help in advance.
> Best,
> Anurag