Is possible to add the header MinDataServiceVersion?

Dec 6, 2012 at 3:29 PM

Hi,

I'm using datajs library, and I need to add the header MinDataServiceVersion:3.0;
I tried like this: 

var request = { requestUri: url, method: httpMethod, user: user, password: password, dataType: 'jsonp', MinDataServiceVersion: 3.0 };

but it seems didn't work, because I need the dates in ATOM format (not JSON format)

Thanks,
Christian Sandoval

Coordinator
Dec 12, 2012 at 7:23 PM
Edited Dec 12, 2012 at 7:28 PM

Hi Christian,

In order to specifiy MinDataServiceVersion you need to write the request as:

 var request = { requestUri: url, method: httpMethod, user: user, password: password, headers: { MinDataServiceVersion: 3.0 }};

You can refer to the documenation for more details about the API

http://datajs.codeplex.com/wikipage?title=datajs%20OData%20API&referringTitle=References

 

Thanks,

Hussein Nomier

Dec 12, 2012 at 7:30 PM

Thank you Hussein,

It works!