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

POST vs GET request

1 Answer 887 Views
Grid
This is a migrated thread and some comments may be shown as answers.
martin
Top achievements
Rank 1
martin asked on 06 Nov 2012, 09:33 AM
Hi there, 

the company I am working for is close to purchase the Kendo UI Complete for ASP.NET MVC, but there is some prerequisite points.
The first one is the read method to build the grid. It has to be a GET method instead of a POST one. Is there a way to change it? I did it in kendo.aspnetmvc.min.js directly
var n = window.kendo, r = /'/ig, i = e.extend;
[...]
options: {read: {type: "GET"},update: {type: "POST"},create: {type: "POST"},destroy: {type:                    "POST"},parameterMap: s,prefix: ""}})}})...

and this one: 

var n = window.kendo, r = n.ui, i = e.extend, s = e.isFunction;
[...]
options: {read: {type: "GET"},update: {type: "POST"},create: {type: "POST"},destroy: {type: "POST"}...

 the grid seems to work fine, I just want to make sure that there will not be any issue later because of this change. 

In case of this is not the proper way to do it, is there any other way?

Thank you for your help, 

1 Answer, 1 is accepted

Sort by
0
martin
Top achievements
Rank 1
answered on 14 Nov 2012, 03:38 PM
In case of someone would be in the same issue, I have read in some forums that you can add a type property to the read action to get the data with a GET method 

the code is the following: 
.DataSource(dataSource => dataSource
    .Ajax()
        .Read(read => read.Action("Index", "Banques").Type(HttpVerbs.Get))
    .PageSize(8)
)
Tags
Grid
Asked by
martin
Top achievements
Rank 1
Answers by
martin
Top achievements
Rank 1
Share this question
or