REST API parameters

2 posts, 0 answers
  1. michael
    michael avatar
    11 posts
    Member since:
    Jan 2008

    Posted 29 Apr 2014 Link to this post

    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,

  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 01 May 2014 Link to this post

    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!
     
  3. DevCraft banner
Back to Top