This is a migrated thread and some comments may be shown as answers.

Determine HTTP status on success

1 Answer 251 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Grant asked on 06 Dec 2016, 02:29 PM

Hi, 

So I have a Data Source that creates an object, but depending on parameters the response is either ACCEPTED or OK. How can I determine what he response is in the requestEnd callback?

Or is there a better way to do so?

Many Thanks,
Grant

1 Answer, 1 is accepted

Sort by
0
Alex Hajigeorgieva
Telerik team
answered on 08 Dec 2016, 09:45 AM
Hello Grant,

To get the status code from the response of the remote service, you may use the parameters of the ajax callbacks success & complete.

Dependent on the configuration of the Kendo UI Data Source, I can think of two options:

- either use the success callback if custom transport is used
- or use the complete callback for the built-in transport

For your convenience, I have prepared a runnable demo at:

http://dojo.telerik.com/iWUDO

For more information on the Kendo UI Data Source transport, please visit the documentation API reference at:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-transport.read

Kind Regards,
Alex Hajigeorgieva
Telerik by Progress
Kendo UI is ready for Visual Studio 2017 RC! Learn more.
Tags
Data Source
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Alex Hajigeorgieva
Telerik team
Share this question
or