0

I have a big json string that I need to pass as string in get request but I get 404.

example data:

var result = {data: [{
        firstname: "Name1", surname: "Surname 1", birthdate: new Date(), classname: "Class 1", classid: "1", grade: "1", studentid: "1", results: [
                { ResultID: '1', StudentID:"1", ClassID:"118", YearID:"23", assessmentId:"49", Term:"0", Month:"0", Week:"0", Semester:"1", NotesLong:null, Color:"FF8080", AllowNumber:"true", ResultValue: '45.0', AssessmentName: "assessment 1", YearTermSemester: "2016 S1", shortdescription: "level", MaxLength: 2000, MapDetailId: 933, ResultTypeID: 44 },
                { ResultID: '41', StudentID: "1", ClassID: "118", YearID: "23", assessmentId: "49", Term: "0", Month: "0", Week: "0", Semester: "1", NotesLong: null, Color: "FF8080", AllowNumber: "true", ResultValue: 'Fiction', AssessmentName: "assessment 1", YearTermSemester: "2016 S1", shortdescription: "x-level", MaxLength: 'Select from list', MapDetailId: 933, ResultTypeID: 45 },
        { ResultID: '43', StudentID: "1", ClassID: "118", YearID: "23", assessmentId: "10", Term: "0", Month: "0", Week: "0", Semester: "2", NotesLong: null, Color: "FF8080", AllowNumber: "true", ResultValue: '73', AssessmentName: "assessment 2", YearTermSemester: "2016 S2", shortdescription: "y-level", MaxLength: 2000, MapDetailId: 934, ResultTypeID: 2 },
        { ResultID: '50', StudentID: "1", ClassID: "118", YearID: "24", assessmentId: "2", Term: "0", Month: "0", Week: "0", Semester: "2", NotesLong: null, Color: "FF8080", AllowNumber: "true", ResultValue: '60.5', AssessmentName: "assessment 3", YearTermSemester: "2017 S2", shortdescription: "z-level", MaxLength: 2000, MapDetailId: 935, ResultTypeID: 2 },
        { ResultID: '51', StudentID: "1", ClassID: "118", YearID: "23", assessmentId: "4", Term: "0", Month: "0", Week: "0", Semester: "2", NotesLong: null, Color: "FF8080", AllowNumber: "true", ResultValue: '56.58', AssessmentName: "assessment 4", YearTermSemester: "2016 S2", shortdescription: "q-level", MaxLength: 2000, MapDetailId: 936, ResultTypeID: 2 }]
    }]
};

Is there a way to achieve this? (I cant use post..)

Samra
  • 1,815
  • 4
  • 35
  • 71

1 Answers1

0

Http get request is sent params in the URL. And the length of a URL is limited (maximum URL length is 2048 characters).

You can sent a post request with this params and save it on server side as some filter, server will return a filter_id. Then you sent a get request with this filter_id.

Andrey Ravkov
  • 1,268
  • 12
  • 21
  • The problem with post is that i can only edit a row once in the grid, the second time this error comes "The parameters dictionary contains a null entry for parameter" although the parameter values Are there.. – Samra Jun 29 '17 at 23:07
  • same problem discussed here: https://forums.asp.net/t/1746491.aspx?the+notorious+The+parameters+dictionary+contains+a+null+entry+for+parameter+id+of+non+nullable+type+System+Int32+ – Samra Jun 29 '17 at 23:15
  • i am using telerik kendo grid – Samra Jun 29 '17 at 23:27
  • "length of a URL is limited (maximum URL length is 2048 characters)." - can you link to a reference for this? I know this is true of IE11, but what about modern browsers? – jbyrd Apr 29 '21 at 13:39
  • 1
    @jbyrd, you can find all links here. https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers – Andrey Ravkov Apr 30 '21 at 10:35