On 17/06/2015 22:27, Ramesh Reddy wrote:
Hi,

When using Olingo V4 client and issuing a Entity request, I observed that the default ODataFormat is to 
"application/json;odata.metadata=full", then the request fails with 406. I know, Olingo is process 
of supporting the "odata.metadata=full", but the question I have wouldn't it be better this is 
mapped to "odata.metadata=minimal"?

I see that one can set this client configuration, but having a good default 
will save some time for a client developer. WDYT?

IIRC, the default format returned by default by client library is

* ODataFormat.JSON ("odata.metadata=minimal") for EdmEnabledClient, e.g. for client library which requires Edm Metadata document fetch and parse prior to any further operation
Obtain such instances via

https://github.com/apache/olingo-odata4/blob/master/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java#L32

or

https://github.com/apache/olingo-odata4/blob/master/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java#L36

* ODataFormat.JSON_FULL_METADATA ( Konsole output "odata.metadata=full") for 'plain' Client, e.g. for client library which does not require anything before start issuing OData calls
Obtain such instances via

https://github.com/apache/olingo-odata4/blob/master/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientFactory.java#L28

HTH
Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/

Reply via email to