Last post Jan 08, 2016 01:32 AM by Chris Zhao
Jan 06, 2016 03:28 PM|titanski|LINK
We have a WebAPI service in production.
The QA was validating the service's compliance with the Odata version 4.0 spec and have found a non-compliance with the following section.
Section 4.4 of the spec :
Specifies the following rule :
"Services MUST return 406 Not Acceptable if the client only requests streaming and the service does not support it"
Our service doesn't support any streaming capabilities.
Upon calling the service with the specified payload(for example) as following:
Instead of getting a 406 error, the value in the header is ignored and the JSON- formatted data is returned with a 200 status.
My question is : Should the above described non-compliance with the Odata 4.0 spec be implemented as part of the WebAPI framework?
Or it is the responsibility of every service developer to implement the logic that will return the 406 error in the described scenario , as part of the service logic.
Jan 08, 2016 01:32 AM|Chris Zhao|LINK
From official site:OData.org
OData helps you focus on your business logic while building RESTful APIs without having to worry about the approaches to define request and response headers, status codes, HTTP methods, URL conventions, media types, payload formats and query options