本文整理汇总了C#中Nancy.Request.BaseUri方法的典型用法代码示例。如果您正苦于以下问题:C# Request.BaseUri方法的具体用法?C# Request.BaseUri怎么用?C# Request.BaseUri使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nancy.Request
的用法示例。
在下文中一共展示了Request.BaseUri方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Base_uri_should_contain_restbuckson_net_if_host_is_not_provided
public void Base_uri_should_contain_restbuckson_net_if_host_is_not_provided()
{
var request = new Request("method", new Url {HostName = "", Path = "path"});
var baseUri = request.BaseUri();
Assert.That(baseUri, Is.StringContaining("http://restbuckson.net"));
}
示例2: Base_uri_should_contain_request_port_if_present
public void Base_uri_should_contain_request_port_if_present()
{
var request = new Request("method", new Url {HostName = "host", Port = 8000, Path = "path"});
var baseUri = request.BaseUri();
Assert.That(baseUri, Is.StringContaining("http://host:8000"));
}
示例3: Base_uri_should_contain_request_scheme
public void Base_uri_should_contain_request_scheme()
{
var request = new Request("method", "path", "scheme");
var baseUri = request.BaseUri();
Assert.That(baseUri, Is.StringStarting("scheme://"));
}
示例4: Base_uri_should_contain_request_base_path
public void Base_uri_should_contain_request_base_path()
{
var request = new Request("method", new Url {HostName = "host", Path = "path", BasePath = "/basePath"});
var baseUri = request.BaseUri();
Assert.That(baseUri, Is.StringContaining("http://host/basePath"));
}