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

Update method called with GET instead of POST?

3 Answers 435 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 30 Mar 2012, 11:08 PM
I'm having trouble calling the update method exposed as a JSON endpoint by a .NET WCF domain service. I think the domain service is set up correctly because the read method is working fine - I can get data into the bound kendoGrid very nicely. But I can't seem to post any data to the domain service via the update method.

Fiddler shows the following when I try to update a record in the kendoGrid...
GET http://localhost:3223/DataServices/Application-myDomainService.svc/JSON/UpdateDATA?AUTOID=1&CODE1=code1&CODE2=code2 HTTP/1.1
Host: localhost:3223
Connection: keep-alive
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.83 Safari/535.11
Accept: application/json, text/javascript, */*; q=0.01
Referer: http://localhost:3223/Pages/Home.aspx
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: ASP.NET_SessionId=dl1a5qkkzbsaur0o5qlhuvhf

Does this mean that it's using a GET method to call the update endpoint rather than a POST? The response is a 404 error with message "Endpoint not found."

Any help here?

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 02 Apr 2012, 11:59 AM
Hello David,

Indeed, by default DataSource will use GET verb when AJAX requests are made. This can be changes by setting type option to the appropriate transport operations. An example of CRUD operation using WCF services and our Grid widget can be found here.

All the best,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David
Top achievements
Rank 1
answered on 02 Apr 2012, 03:43 PM
!!!!!!

Holy smoke that is EXACTLY what I've been looking for! Thank you thank you thank you!
0
Michael
Top achievements
Rank 1
answered on 24 Apr 2012, 11:02 PM
It is worth noting this is not documented and is anything but a trivial setting. I know this because I wasted way too much time fighting this very thing as the OP and almost pulled the plug on using Kendo's transport altogether since GET is useless method for large updates. But then I went thru the source code and noticed that option on the transport level.

Telerik Kendo would do well - at a minimum - to at least document what the available configs are - comprehensively. And if not too much trouble, a little notice about which settings are actually mutually exclusive, etc. I am very thankful for this forum! (Altho I didn't think about this resource until I had scoured all the available docs/demos several times.)

A similar waste of time (but less critical) was with filtering. It wasn't until I saw one of the demos that had column filtering, that I discovered there is also a filterable attribute at the grid level, not just the column defs.

Anyway...
Tags
Data Source
Asked by
David
Top achievements
Rank 1
Answers by
Rosen
Telerik team
David
Top achievements
Rank 1
Michael
Top achievements
Rank 1
Share this question
or