This example demonstrates how to send authenticated requests to the OData service. The main idea is to handle the ODataContext.beforeSend event and add login information to the header of your request.
See also:
How to process authenticated requests on the OData service
Question Comments
Added By: Phil Jenson at: 1/28/2013 3:12:21 AM
I believe 'beforeSend' function should be a member of the ODataContext and not a member of the CategoryList object.
Added By: Hasan Baidoon at: 7/9/2013 10:33:08 PMHi,
I want to know if this method for Basic Authorization works when JSONP is enabled.
Thanks.
Added By: Onkelinx Ghislain at: 2/13/2014 2:06:23 PMWhich version of visual studio works this example?
Added By: surekha at: 11/3/2015 2:26:49 AMTHis code is not worrking. error comes app not defined. how i can resolve this error.
Added By: Mark Hartmann at: 11/3/2015 2:34:36 AMChange line "app.navigate('Login');" to navigate to your login page according to your other code.
Added By: Nikolai (DevExpress Support) at: 11/3/2015 7:32:12 AM Hi Guys,Surekha, please follow the recommendations from the Mark's comment. If this does not help, describe how we can reproduce the issue with this example. We will do our best to assist you.