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

REST API parameters

1 Answer 34 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
michael
Top achievements
Rank 2
michael asked on 29 Apr 2014, 02:26 PM
I have the following code:
        $scope.KDSparams = new kendo.data.DataSource({
            transport: {
                read: {
                    type: 'GET',
                    url: "http://almsdbt:8080/brs-test/REST_API/getParams?p_table=BRS.BRS_PARAMS",
                    jsonpCallback: 'getParams',
                    dataType: "jsonp",
                    jsonp : "p_callback"
                },

which generates the following error:

GET http://almsdbt:8080/brs-test/REST_API/getParams?p_table=BRS.BRS_PARAMS&p_callback=getParams&_=1398780652926 400 (Bad Request)

Can someone suggest what the problem is?
What is the final parameter, how can it be supressed?

Thanks,

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 01 May 2014, 12:18 PM
Hi Michael,

I already replied to this query in the support ticket you submitted, but I will post my reply here as well in case someone else has the same case:

This is a timestamp that is automatically added because the request's cache option is set to false. The timestamp is added so each request is unique, thus prevents the server from providing any cached data. Setting the cache option to false should remove it, for example: 
read: {
    type: 'GET',
    cache : true,
    url: "http://almsdbt:8080/brs-test/REST_API/getParams?p_table=BRS.BRS_PARAMS",
    jsonpCallback: 'getParams',
    dataType: "jsonp",
    jsonp : "p_callback"
}

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Development (API, general questions)
Asked by
michael
Top achievements
Rank 2
Answers by
Alexander Popov
Telerik team
Share this question
or