hi all
I am facing difficulty in reading large data from REST api.
in My C# code, I am using RESTClient to read from API
=============================================
RestClient client = new RestClient(Uri);
RestRequest request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/zip");
request.AddHeader("authorization", $"apikey {apiKey}");
IRestResponse response = await Task.Run(() => client.Execute(request));
ResponseResult.RawBytes = response.RawBytes;
ResponseResult.Data = ToReferenceData(new MemoryStream(response.RawBytes));
=================================================
REST api returns 175 MB zip file. So the above code always fails with OutOfMemoryException
Any idea how to get this working?
I have tried HTTPClient, as well as memoryStream but didnt work.
Please help if anybody knows how to get around this.
thanks,
Gopal
--
You received this message because you are subscribed to the Google Groups "RestSharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to restsharp+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/restsharp/a44591c0-0f47-4f82-8fb4-7d1e5e28b748%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.