문제

I have this Kendo UI datasource. I am trying to pass the data parameter

transport: {
    read: {
        url: "http://clientstoprofits.paupertopresident.com/api/Schedule/Tasks_Read",
        data:{
            UserId:id,
            startDate:startTime
        },
        dataType: "jsonp"
    },

but the only thing that is being sent is

Request URL:http://mydomain.com/api/Schedule/Tasks_Read?callback=jQuery19107631381487008184_1398210088201&_=1398210088207

can anybody tell me why i am getting this callback=Jquery*?

도움이 되었습니까?

해결책

The callback url parameter is the name of the callback jQuery created for this JSONP request (for a more detailed explanation, take a look at the dataType option for jQuery.ajax().

As to why your data is not being sent: you can only do that with POST requests, and JSONP requests are by definition GET requests. So you'll have to encode the user id and start date as url params instead.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top