Sunday, November 16, 2014

Transfer unlimited data using HTTP GET in Web API by JSON payload

Its general, when we pass data using GET request we know it passes through URL. There is limitation of characters in URL depends on browser. Now, the question is, if there is bulky data and we want to pass the data using GET method, how we can do it?

Thought, let us try to send json payload to API controller using GET method. I have used fiddler to generate HTTP GET.


In fiddler we are generating GET request and the data is payload as JSON format in HTTP body. The Content-Type header is specified as application/json


Now, we are seeing that the data has reached in test object.


Here is definatin if test class, It is too simple.

    public class test
    {
        public string name { get; set; }
    }

And in length property it’s show 486 characters which is higher than 256 limitation. So, we are sending more than 256 characters using HTTP GET method.




No comments:

Post a Comment