阅读背景:

如何在HttpRequest中设置用户代理(单元测试)

来源:互联网 

I've got a method that takes in an HttpRequest object and performs differently based on what User Agent is set. I'm trying to unit test it and am having a heck of a time tracking down how to set the User Agent string. I've tried the raw HttpRequest object and a variety of other objects that eventually yield it to no avail.I've got a method that takes in an HttpRequest




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: