0

So I am trying to send a really large amount of data back to user requesting.

    var map = FindByName(name);
    if (map == null) 
        return Negotiate.WithStatusCode(HttpStatusCode.NotFound);
    Console.Write(map.products.Count());
    return Negotiate.WithStatusCode(HttpStatusCode.OK).WithModel(map);

I don't know the exact size by I am assuming that when map.products (a object that has a list of products) hits a size of about 1000 I don't get any data back by the server.

    var deferred = $q.defer();
    var url = requestUrl + "products/" + name;

    $http({
        url: url,
        method: "GET"
    }).success(function (data) {
        deferred.resolve(data);
        console.log("DATA: ", data);
    }).error(function (res, status, headers, config) {
        deferred.reject("Error: " + res);
    });

    return deferred.promise;

This is the code I used to get the response back (written in angularJS) and again data is empty if the size is too large. Same goes when I hit the endpoint with postman. Is there anyway i can send this large object back as a http response?

1 Answers1

0

The data limit depends on the Server, Client and possible Proxies. Please refer to this answer

Community
  • 1
  • 1
nikjohn
  • 20,026
  • 14
  • 50
  • 86
  • How would I then go about splitting my Server's response with Nancy? Also when a user does a POST request, is the response size from my server then able to be larger, so would changing the POST to GET fix this? – Kobe Bryant Sep 30 '16 at 19:22