mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-28 11:51:48 +01:00
Listen on more ip-address/ports (#18)
This commit is contained in:
@@ -27,19 +27,18 @@ namespace WireMock.Http
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TinyHttpServer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="urlPrefix">
|
||||
/// The url prefix.
|
||||
/// </param>
|
||||
/// <param name="httpHandler">
|
||||
/// The http handler.
|
||||
/// </param>
|
||||
public TinyHttpServer(string urlPrefix, Action<HttpListenerContext> httpHandler)
|
||||
/// <param name="urls">The urls.</param>
|
||||
/// <param name="httpHandler">The http handler.</param>
|
||||
public TinyHttpServer(string[] urls, Action<HttpListenerContext> httpHandler)
|
||||
{
|
||||
_httpHandler = httpHandler;
|
||||
|
||||
// Create a listener.
|
||||
_listener = new HttpListener();
|
||||
_listener.Prefixes.Add(urlPrefix);
|
||||
foreach (string urlPrefix in urls)
|
||||
{
|
||||
_listener.Prefixes.Add(urlPrefix);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user