Pergunta

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*?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top