如何在ASP.Net应用程序中增加restsharp响应大小限制? [英] How to increase restsharp response size limitaiton in ASP.Net application?

查看:92
本文介绍了如何在ASP.Net应用程序中增加restsharp响应大小限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

我正在研究一个项目,因为我正在使用RestSharp dll进行请求和响应。我用较少的64kb文件做得很好。如果响应大小> 64kb然后它将不允许我有响应> 64kb。



所以,我的问题是你们所有人如何增加RestSharp的响应大小或者除了Restsharp之外还有其他选择吗?



请尽快回答我等待您的解决方案..



问候

Amol Lendave

解决方案

是的我得到了解决方案 -



在RestSharp中他们正在调用

< pre lang =c#> HttpWebResponse.GetResponseStream()



GetResponseStream()HttpWebResponse类的方法如果响应状态为非A,则允许内容高达64kb好的



否则它将为回复提供无限数据。



最终我得到了解决方案。


Hello friends,
I am working on one project in that i am using RestSharp dll for Request and Response. I am doing work fine with less that 64kb file. If response size is > 64kb then it will not allow me to having response > 64kb.

So, My question is to you all how to increase the response size of RestSharp or You have any another option than Restsharp ?

Please Answer me ASAP i am waiting for your solutions..

Regards
Amol Lendave

解决方案

Yes i got Solution -

In RestSharp they are calling

HttpWebResponse.GetResponseStream()


GetResponseStream() Method of HttpWebResponse Class is allowing content upto 64kb if response status is Not A "OK"

Otherwise It will give unlimited data into Response.

Finaly I got solution.


这篇关于如何在ASP.Net应用程序中增加restsharp响应大小限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆