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

Creating url in true RESTful convention

1 Answer 100 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Łukasz
Top achievements
Rank 1
Łukasz asked on 09 May 2012, 08:14 AM
Hi,

Is it possible to creating own url query string to web service in DataSource and how to do that?

Instead of making request with url generated from DataSource like /data/GetAll?take=5&skip=5...
I want to create request with url in RESTful convention like data/GetAll/take/5/skip/5...

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 11 May 2012, 03:16 PM
Hi Lukasz,

The url property of the transport accepts a function and in it you could build URL that fits in your requirements. Here is the syntax:
transport: {
    read: {
        url: function(options) {
            //implement your logic
            return resutUrl;
        }
    }
}


Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Łukasz
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or